Commit e0010798 authored by David黄金龙's avatar David黄金龙

开屏协议确认

parent 9dfaa5e9
...@@ -2976,7 +2976,7 @@ ...@@ -2976,7 +2976,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -3177,7 +3177,7 @@ ...@@ -3177,7 +3177,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -3219,7 +3219,7 @@ ...@@ -3219,7 +3219,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 11;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
......
...@@ -232,7 +232,7 @@ extension YHHomePageViewController : UITabBarControllerDelegate { ...@@ -232,7 +232,7 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
vc.modalPresentationStyle = .custom vc.modalPresentationStyle = .custom
UIViewController.current?.navigationController?.present(vc, animated: true) UIViewController.current?.navigationController?.present(vc, animated: true)
YHLoginManager.shared.loginSuccessActionBlock = {[weak self] in YHLoginManager.shared.loginSuccessActionBlock = {[weak self] in
guard let self = self else { return } guard self != nil else { return }
tabBarController.selectedIndex = index tabBarController.selectedIndex = index
YHLoginManager.shared.loginSuccessActionBlock = nil YHLoginManager.shared.loginSuccessActionBlock = nil
} }
......
...@@ -100,9 +100,34 @@ private extension YHStartPageViewController { ...@@ -100,9 +100,34 @@ private extension YHStartPageViewController {
make.edges.equalToSuperview() make.edges.equalToSuperview()
} }
// agreeAlertView.isHidden = false //
// cancelTimer()
// closeBtn.isHidden = true//for test hjl agreeAlertView.isHidden = false
cancelTimer()
closeBtn.isHidden = true//for test hjl
agreeAlertView.agreeBlock = {
self.startTimer()
}
agreeAlertView.cancelBlock = {
//点击了取消按钮
YHCommonAlertView.show("", "确认退出超级APP?", "退出", "继续使用") {
//退出
exit(0)
} callBack: {
//继续使用
self.view.addSubview(self.agreeAlertView)
self.agreeAlertView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
self.agreeAlertView.isHidden = false
self.cancelTimer()
self.closeBtn.isHidden = true//for test hjl
}
}
} }
@objc func clickCancelBtn() { @objc func clickCancelBtn() {
......
...@@ -11,6 +11,7 @@ import UIKit ...@@ -11,6 +11,7 @@ import UIKit
class YHAgreementAlertView: UIView { class YHAgreementAlertView: UIView {
typealias AgreeBlock = () -> () typealias AgreeBlock = () -> ()
var agreeBlock: AgreeBlock? var agreeBlock: AgreeBlock?
var cancelBlock:AgreeBlock?
var centerView: UIView! var centerView: UIView!
var titleLabel: UILabel! var titleLabel: UILabel!
var lineView: UIView! var lineView: UIView!
...@@ -179,6 +180,9 @@ class YHAgreementAlertView: UIView { ...@@ -179,6 +180,9 @@ class YHAgreementAlertView: UIView {
} }
@objc func disagree() { @objc func disagree() {
if let block = self.cancelBlock {
block()
}
dismiss() dismiss()
} }
......
...@@ -11,6 +11,7 @@ import UIKit ...@@ -11,6 +11,7 @@ import UIKit
class YHCommonAlertView: UIView { class YHCommonAlertView: UIView {
typealias AgreeBlock = () -> () typealias AgreeBlock = () -> ()
var agreeBlock: AgreeBlock? var agreeBlock: AgreeBlock?
var cancelBlcok: AgreeBlock?
var centerView: UIView! var centerView: UIView!
var titleLabel: UILabel! var titleLabel: UILabel!
var lineView: UIView! var lineView: UIView!
...@@ -18,9 +19,10 @@ class YHCommonAlertView: UIView { ...@@ -18,9 +19,10 @@ class YHCommonAlertView: UIView {
var agreeButton: UIButton! var agreeButton: UIButton!
var disAgressButton: UIButton! var disAgressButton: UIButton!
static func show(_ title: String? = nil, _ message: String? = nil, _ leftButtonString: String? = nil, _ rightButtonString: String? = nil, callBack: @escaping (() -> Void)) { static func show(_ title: String? = nil, _ message: String? = nil, _ leftButtonString: String? = nil, _ rightButtonString: String? = nil,cancelCallBack: (() -> Void)? = nil, callBack: @escaping (() -> Void)) {
let view = YHCommonAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)) let view = YHCommonAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.agreeBlock = callBack view.agreeBlock = callBack
view.cancelBlcok = cancelCallBack
view.setContent(title, message, leftButtonString, rightButtonString) view.setContent(title, message, leftButtonString, rightButtonString)
let window = UIApplication.shared.yhKeyWindow() let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view) window?.addSubview(view)
...@@ -54,6 +56,10 @@ class YHCommonAlertView: UIView { ...@@ -54,6 +56,10 @@ class YHCommonAlertView: UIView {
make.height.lessThanOrEqualTo(60) make.height.lessThanOrEqualTo(60)
make.top.equalTo(37) make.top.equalTo(37)
} }
lineView.isHidden = true
} else {
lineView.isHidden = false
} }
} }
...@@ -176,6 +182,9 @@ class YHCommonAlertView: UIView { ...@@ -176,6 +182,9 @@ class YHCommonAlertView: UIView {
} }
@objc func disagree() { @objc func disagree() {
if let block = self.cancelBlcok {
block()
}
dismiss() dismiss()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment