Browse Source

修改离开弹窗

harry 3 years ago
parent
commit
6ef5423c16
1 changed files with 4 additions and 20 deletions
  1. 4 20
      Introduce/Record/INVideoExportController.swift

+ 4 - 20
Introduce/Record/INVideoExportController.swift

@@ -691,31 +691,15 @@ class INVideoExportController: BFBaseViewController {
         if (!hasSaveOnly && !saveOnlyUlr.absoluteString.contains("aaa"))
             || (!hasSaveAll && !saveAllUlr.absoluteString.contains("aaa")) {
             
-            let alertController = UIAlertController(title: "你还未保存视频哦,是否需要保存视频再离开?",
+            let alertController = UIAlertController(title: "你还未保存视频哦,是否确定离开?",
                            message: "", preferredStyle: .alert)
-            let cancelAction = UIAlertAction(title: "不保存", style: .default){[weak self] action in
-                guard let sself = self else {
-                    return
-                }
-                sself.export.cancelExport()
-                sself.navigationController?.popToRootViewController(animated: true)
+            let cancelAction = UIAlertAction(title: "取消", style: .default){_ in
+               
             }
-            let okAction = UIAlertAction(title: "保存视频", style: .default) {[weak self] action in
+            let okAction = UIAlertAction(title: "确定离开", style: .default) {[weak self] action in
                 guard let sself = self else {
                     return
                 }
-                if sself.hasExportOnly {
-                    PHPhotoLibrary.shared().performChanges {
-                        PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: sself.saveOnlyUlr)
-                    } completionHandler: { _, _ in
-                    }
-                }
-                if sself.hasExportAll {
-                    PHPhotoLibrary.shared().performChanges {
-                        PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: sself.saveAllUlr)
-                    } completionHandler: { _, _ in
-                    }
-                }
                 sself.export.cancelExport()
                 sself.navigationController?.popToRootViewController(animated: true)
             }