Browse Source

添加返回提示

jsonwang 4 years ago
parent
commit
521069bc60

+ 24 - 0
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -254,6 +254,30 @@ class PQStuckPointPublicController: PQBaseViewController {
         return oprationBgView
     }()
 
+    
+    override func backBtnClick() {
+        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
+            if item.tag == 2 {
+                // 取消导出
+                if self?.exporter != nil {
+                    self?.exporter.cancel()
+                }
+                self?.navigationController?.popViewController(animated: true)
+             
+            }
+        }
+    }
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         // 注册上传成功的通知