|
@@ -77,26 +77,24 @@ class INIntroduceController: BFBaseViewController {
|
|
|
}
|
|
|
|
|
|
override func 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)
|
|
|
+
|
|
|
+ let alertController = UIAlertController(title: "退出将不会保存当前操作",
|
|
|
+ message: "", preferredStyle: .alert)
|
|
|
+ let cancelAction = UIAlertAction(title: "不退出", style: .default, handler: nil)
|
|
|
+
|
|
|
+ let okAction = UIAlertAction(title: "确认退出", style: .cancel, handler: {[weak self]
|
|
|
+ action in
|
|
|
+ print("点击了确定")
|
|
|
+ self?.recordScreenVC.backBtnClick()
|
|
|
+ self?.super_back()
|
|
|
+ })
|
|
|
+ okAction.setValue(UIColor.red, forKey:"titleTextColor")
|
|
|
+
|
|
|
+ alertController.addAction(okAction)
|
|
|
+ alertController.addAction(cancelAction)
|
|
|
+
|
|
|
+ self.present(alertController, animated: true, completion: nil)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private func super_back() {
|