|
@@ -659,23 +659,39 @@ class INVideoExportController: BFBaseViewController {
|
|
}
|
|
}
|
|
|
|
|
|
func whetherCancelExport(comfirm: (() -> Void)?) {
|
|
func whetherCancelExport(comfirm: (() -> Void)?) {
|
|
- let remindData = BFBaseModel()
|
|
|
|
- remindData.summary = "正在合成中,是否取消?"
|
|
|
|
- let alertV = BFRemindView(frame: view.bounds)
|
|
|
|
- alertV.isBanned = true
|
|
|
|
- alertV.confirmBtn.setTitle("继续合成", for: .normal)
|
|
|
|
- alertV.cancelBtn.setTitle("取消合成", for: .normal)
|
|
|
|
- alertV.remindData = remindData
|
|
|
|
- alertV.remindBlock = { [weak self] item, _ in
|
|
|
|
|
|
+ let alertController = UIAlertController(title: "正在合成中,是否取消?",
|
|
|
|
+ message: "", preferredStyle: .alert)
|
|
|
|
+ let cancelAction = UIAlertAction(title: "继续合成", style: .default, handler: nil)
|
|
|
|
+ let okAction = UIAlertAction(title: "取消合成", style: .default) {[weak self] action in
|
|
guard let sself = self else {
|
|
guard let sself = self else {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if item.tag == 1 { // 确定返回到上一层
|
|
|
|
- sself.export.cancelExport()
|
|
|
|
- comfirm?()
|
|
|
|
- }
|
|
|
|
|
|
+ sself.export.cancelExport()
|
|
|
|
+ comfirm?()
|
|
}
|
|
}
|
|
- UIApplication.shared.keyWindow?.addSubview(alertV)
|
|
|
|
|
|
+ alertController.addAction(okAction)
|
|
|
|
+ alertController.addAction(cancelAction)
|
|
|
|
+
|
|
|
|
+ self.present(alertController, animated: true, completion: nil)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// let remindData = BFBaseModel()
|
|
|
|
+// remindData.summary = "正在合成中,是否取消?"
|
|
|
|
+// let alertV = BFRemindView(frame: view.bounds)
|
|
|
|
+// alertV.isBanned = true
|
|
|
|
+// alertV.confirmBtn.setTitle("继续合成", for: .normal)
|
|
|
|
+// alertV.cancelBtn.setTitle("取消合成", for: .normal)
|
|
|
|
+// alertV.remindData = remindData
|
|
|
|
+// alertV.remindBlock = { [weak self] item, _ in
|
|
|
|
+// guard let sself = self else {
|
|
|
|
+// return
|
|
|
|
+// }
|
|
|
|
+// if item.tag == 1 { // 确定返回到上一层
|
|
|
|
+// sself.export.cancelExport()
|
|
|
|
+// comfirm?()
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// UIApplication.shared.keyWindow?.addSubview(alertV)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|