| | |
| | | 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) |
| | |
| | | |
| | | 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) |
| | | } |
| | | |
| | | |