浏览代码

移除提示框

jsonwang 3 年之前
父节点
当前提交
d32e4ca942

+ 11 - 8
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -47,6 +47,8 @@ class PQStuckPointPublicController: PQBaseViewController {
     // 导出进度
     private var exportProgrss = 0
     var mStickers: [PQEditVisionTrackMaterialsModel]?
+    
+    var remindView:PQRemindView?
     // 预览大小
     private var preViewSize: CGSize {
         switch aspectRatio {
@@ -263,14 +265,14 @@ class PQStuckPointPublicController: PQBaseViewController {
             view.endEditing(true)
             let remindData = PQBaseModel()
             remindData.title = "编辑的内容,将不会被保存"
-            let remindView = PQRemindView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
-            remindView.isBanned = true
-            remindView.confirmBtn.setTitle("确认", for: .normal)
-            remindView.cancelBtn.setTitleColor(UIColor.hexColor(hexadecimal: "#333333"), for: .normal)
-            remindView.confirmBtn.setTitleColor(UIColor.hexColor(hexadecimal: "#EE0051"), for: .normal)
-            UIApplication.shared.keyWindow?.addSubview(remindView)
-            remindView.remindData = remindData
-            remindView.remindBlock = { [weak self] item, _ in
+            remindView = PQRemindView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
+            remindView?.isBanned = true
+            remindView?.confirmBtn.setTitle("确认", for: .normal)
+            remindView?.cancelBtn.setTitleColor(UIColor.hexColor(hexadecimal: "#333333"), for: .normal)
+            remindView?.confirmBtn.setTitleColor(UIColor.hexColor(hexadecimal: "#EE0051"), for: .normal)
+            UIApplication.shared.keyWindow?.addSubview(remindView!)
+            remindView?.remindData = remindData
+            remindView?.remindBlock = { [weak self] item, _ in
                 if item.tag == 2 {
                     // 取消导出
                     if self?.exporter != nil {
@@ -444,6 +446,7 @@ extension PQStuckPointPublicController {
             if self?.exporter != nil {
                 self?.exporter.cancel()
             }
+            self?.remindView?.removeFromSuperview()
             if !(self?.isExportSuccess ?? false) {
                 self?.isExportSuccess = true
                 self?.exportEndDate = Date().timeIntervalSince1970

+ 4 - 0
BFFramework/Classes/Utils/PQConstant.swift

@@ -31,6 +31,10 @@ public let cEditAudioSampleRate = 44100
 
 // 获取安全区域大小
 public let cSafeAreaHeight: CGFloat = cIPHONE_X() == true ? 34.0 : 0.0
+
+// 获取安全区域大小
+public let cAKSafeAreaHeight: CGFloat = cIPHONE_X() == true ? 25.0 : 0.0
+
 public let cDevice_iPhoneStatusBarHei: CGFloat = cIPHONE_X() == true ? 44.0 : 20.0
 public let cDevice_iPhoneNavBarHei: CGFloat = 44.0
 public let cDevice_iPhoneNavBarAndStatusBarHei: CGFloat = cDevice_iPhoneStatusBarHei + cDevice_iPhoneNavBarHei