|
@@ -102,7 +102,14 @@ class INVideoExportController: BFBaseViewController {
|
|
|
btn.setTitleColor(.white, for: .normal)
|
|
|
btn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
|
|
|
btn.setImage(UIImage(named: "export_btn"), for: .normal)
|
|
|
- btn.backgroundColor = ThemeStyleColor
|
|
|
+
|
|
|
+// btn.backgroundColor = ThemeStyleColor
|
|
|
+ btn.setBackgroundImage(UIImage(color: ThemeStyleColor), for: .normal)
|
|
|
+ btn.setBackgroundImage(UIImage(color: UIColor.hexColor(hexadecimal: "#1C4D80")), for: .highlighted)
|
|
|
+ btn.adjustsImageWhenHighlighted = false
|
|
|
+ btn.adjustsImageWhenDisabled = false
|
|
|
+ btn.isEnabled = false
|
|
|
+ btn.alpha = 0.3
|
|
|
btn.addCorner(roundingCorners: .allCorners, corner: 8)
|
|
|
btn.addTarget(self, action: #selector(saveToPhotoNow), for: .touchUpInside)
|
|
|
return btn
|
|
@@ -343,7 +350,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
|
|
|
override func backBtnClick() {
|
|
|
if isExporting {
|
|
|
- whetherCancelExport {
|
|
|
+ whetherCancelExport (msg: "正在合成中,是否取消?"){
|
|
|
self.export.cancelExport()
|
|
|
super.backBtnClick()
|
|
|
}
|
|
@@ -545,7 +552,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
}
|
|
|
|
|
|
saveToPhotoBtn.isEnabled = false
|
|
|
- saveToPhotoBtn.alpha = 0.7
|
|
|
+ saveToPhotoBtn.alpha = 0.3
|
|
|
completeBtn.isEnabled = false
|
|
|
|
|
|
progressView.isHidden = false
|
|
@@ -591,12 +598,12 @@ class INVideoExportController: BFBaseViewController {
|
|
|
}
|
|
|
|
|
|
if isExporting {
|
|
|
- export.cancelExport()
|
|
|
- resetViewStatus()
|
|
|
-// whetherCancelExport {[weak self] in
|
|
|
-// self?.saveAllAction(btn: btn)
|
|
|
-// }
|
|
|
-// return
|
|
|
+ whetherCancelExport {[weak self] in
|
|
|
+ self?.export.cancelExport()
|
|
|
+ self?.resetViewStatus()
|
|
|
+ self?.saveAllAction(btn: btn)
|
|
|
+ }
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
btn.isSelected = true
|
|
@@ -623,12 +630,12 @@ class INVideoExportController: BFBaseViewController {
|
|
|
return
|
|
|
}
|
|
|
if isExporting {
|
|
|
- export.cancelExport()
|
|
|
- resetViewStatus()
|
|
|
-// whetherCancelExport {[weak self ] in
|
|
|
-// self?.saveOnlyAction(btn: btn)
|
|
|
-// }
|
|
|
-// return
|
|
|
+ whetherCancelExport {[weak self ] in
|
|
|
+ self?.export.cancelExport()
|
|
|
+ self?.resetViewStatus()
|
|
|
+ self?.saveOnlyAction(btn: btn)
|
|
|
+ }
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
btn.isSelected = true
|
|
@@ -752,19 +759,19 @@ class INVideoExportController: BFBaseViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- func whetherCancelExport(comfirm: (() -> Void)?) {
|
|
|
- let alertController = UIAlertController(title: "正在合成中,是否取消?",
|
|
|
+ func whetherCancelExport(msg:String = "正在合成中,是否切换?", comfirm: (() -> Void)?) {
|
|
|
+ let alertController = UIAlertController(title: msg,
|
|
|
message: "", preferredStyle: .alert)
|
|
|
- let cancelAction = UIAlertAction(title: "继续合成", style: .default, handler: nil)
|
|
|
- let okAction = UIAlertAction(title: "取消合成", style: .default) {[weak self] action in
|
|
|
+ let cancelAction = UIAlertAction(title: "取消", style: .default, handler: nil)
|
|
|
+ let okAction = UIAlertAction(title: "确定", style: .default) {[weak self] action in
|
|
|
guard let sself = self else {
|
|
|
return
|
|
|
}
|
|
|
sself.export.cancelExport()
|
|
|
comfirm?()
|
|
|
}
|
|
|
- alertController.addAction(okAction)
|
|
|
alertController.addAction(cancelAction)
|
|
|
+ alertController.addAction(okAction)
|
|
|
|
|
|
self.present(alertController, animated: true, completion: nil)
|
|
|
|