Browse Source

增加返回提示

harry 3 years ago
parent
commit
4d326840e5

+ 24 - 1
Introduce/Record/INIntrocudeController.swift

@@ -10,6 +10,7 @@ import BFUIKit
 import Photos
 import BFRecordScreenKit
 import BFCommonKit
+import UIKit
 
 class INIntrocudeController: BFBaseViewController {
     
@@ -76,7 +77,29 @@ class INIntrocudeController: BFBaseViewController {
     
     
     override func backBtnClick() {
-        recordScreenVC.backBtnClick()
+        let remindData = BFBaseModel()
+        remindData.summary = "退出将不会保存当前操作"
+        let alertV = BFRemindView(frame: view.bounds)
+        alertV.isBanned = true
+        alertV.confirmBtn.setTitle("不退出", for: .normal)
+        alertV.confirmBtn.titleLabel?.font = UIFont.systemFont(ofSize: 20, weight: .medium)
+        alertV.cancelBtn.setTitle("确认退出", for: .normal)
+        alertV.cancelBtn.titleLabel?.font = UIFont.systemFont(ofSize: 20, weight: .medium)
+        alertV.contentLab.font = UIFont.systemFont(ofSize: 20, weight: .medium)
+        alertV.remindData = remindData
+        alertV.confirmBtn.setTitleColor(UIColor.black, for: .normal)
+        alertV.cancelBtn.setTitleColor(UIColor.red, for: .normal)
+        alertV.contentLab.textColor = .black
+        alertV.remindBlock = { [weak self] item, _ in
+            if item.tag == 1 {
+                self?.recordScreenVC.backBtnClick()
+                self?.super_back()
+            }
+        }
+        UIApplication.shared.keyWindow?.addSubview(alertV)
+        
+    }
+    private func super_back() {
         super.backBtnClick()
     }
     

+ 1 - 1
Introduce/Record/INRecorderController.swift

@@ -3,7 +3,7 @@
 //  Introduce
 //
 //  Created by 胡志强 on 2021/11/29.
-//
+//  首页
 
 import Foundation
 import BFUIKit