From 09a372bc45fde16fd42257ab6f78b8deeecf720b Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期三, 16 四月 2025 16:38:05 +0800 Subject: [PATCH] fix bug --- XQMuse/Root/Other/View/CommonAlertView.swift | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/XQMuse/Root/Other/View/CommonAlertView.swift b/XQMuse/Root/Other/View/CommonAlertView.swift index 94af98e..ca75341 100644 --- a/XQMuse/Root/Other/View/CommonAlertView.swift +++ b/XQMuse/Root/Other/View/CommonAlertView.swift @@ -54,11 +54,20 @@ alertView.layoutSubviews() } - static func show(title:String,attribute:NSMutableAttributedString,isSingle:Bool = false, clouse:@escaping (Bool)->Void){ + static func show(title:String,attribute:NSMutableAttributedString,isSingle:Bool = false,cancelStr:String? = nil,completeStr:String? = nil, clouse:@escaping (Bool)->Void){ let alertView = CommonAlertView.jq_loadNibView() alertView.label_title.text = title alertView.btn_cancel.isHidden = isSingle alertView.label_content.attributedText = attribute + + if cancelStr != nil{ + alertView.btn_cancel.setTitle(cancelStr!, for: .normal) + } + + if completeStr != nil{ + alertView.btn_complete.setTitle(completeStr!, for: .normal) + } + alertView.clouse = clouse alertView.frame = sceneDelegate?.window?.frame ?? .zero sceneDelegate?.window?.addSubview(alertView) @@ -71,8 +80,7 @@ override func layoutSubviews() { super.layoutSubviews() - btn_complete.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 20) -// btn_complete.localGradientColor(cornerRadius: 20) + btn_complete.localGradientColor(cornerRadius: 20,bounds: CGRect(x: 0, y: 0, width: JQ_ScreenW - 85 * 2, height: 40)) } -- Gitblit v1.7.1