Commit 548fe4bf authored by David黄金龙's avatar David黄金龙

启动时的协议 同步

parent 6c26605f
......@@ -117,7 +117,7 @@ private extension YHStartPageViewController {
agreeAlertView.cancelBlock = {
//点击了取消按钮
YHCommonAlertView.show("", "确认退出银河港生活App?", "退出", "继续使用") {
YHCommonAlertView.show("", "确认退出银河港生活App?", "退出", "继续使用",fullGuestureEnable: false) {
//退出
exit(0)
} callBack: {
......
......@@ -19,11 +19,14 @@ class YHCommonAlertView: UIView {
var agreeButton: UIButton!
var disAgressButton: UIButton!
static func show(_ title: String? = nil, _ message: String? = nil, _ leftButtonString: String? = nil, _ rightButtonString: String? = nil,cancelCallBack: (() -> Void)? = nil, callBack: @escaping (() -> Void)) {
var isFullGuestureEnabel : Bool = true //view响应全局手势 默认响应
static func show(_ title: String? = nil, _ message: String? = nil, _ leftButtonString: String? = nil, _ rightButtonString: String? = nil,fullGuestureEnable : Bool = true,cancelCallBack: (() -> Void)? = nil, callBack: @escaping (() -> Void)) {
let view = YHCommonAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.agreeBlock = callBack
view.cancelBlcok = cancelCallBack
view.setContent(title, message, leftButtonString, rightButtonString)
view.isFullGuestureEnabel = fullGuestureEnable
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
......@@ -179,7 +182,9 @@ class YHCommonAlertView: UIView {
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
if isFullGuestureEnabel {
dismiss()
}
}
@objc func disagree() {
......
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