无故事王国
2023-10-10 a1ac0f1634ff0bd8f04259fc4cf7ebabd8c8c82d
WanPai/Common/View/CommonAlertView.swift
@@ -13,7 +13,9 @@
    @IBOutlet weak var view_container: UIView!
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_content: UILabel!
   @IBOutlet weak var btn_cancel: UIButton!
   @IBOutlet weak var btn_complete: UIButton!
    private var title:String!
    private var content:String!
    private var clouse:((Bool)->Void)!
@@ -26,10 +28,11 @@
    }
    
    
    static func show(title:String,content:String, clouse:@escaping (Bool)->Void){
   static func show(title:String,content:String,isSingle:Bool = false, clouse:@escaping (Bool)->Void){
        let alertView = CommonAlertView.jq_loadNibView()
        alertView.label_title.text = title
        alertView.label_content.text = content
      alertView.btn_cancel.isHidden = isSingle
        alertView.clouse = clouse
        alertView.frame = sceneDelegate?.window?.frame ?? .zero
      sceneDelegate?.window?.addSubview(alertView)
@@ -39,9 +42,10 @@
        }
    }
    static func show(title:String,attribute:NSMutableAttributedString, clouse:@escaping (Bool)->Void){
    static func show(title:String,attribute:NSMutableAttributedString,isSingle:Bool = false, clouse:@escaping (Bool)->Void){
        let alertView = CommonAlertView.jq_loadNibView()
        alertView.label_title.text = title
      alertView.btn_cancel.isHidden = isSingle
        alertView.label_content.attributedText = attribute
        alertView.clouse = clouse
        alertView.frame = sceneDelegate?.window?.frame ?? .zero
@@ -52,6 +56,11 @@
        }
    }
   override func layoutSubviews() {
      super.layoutSubviews()
      btn_complete.localGradientColor(cornerRadius: 20)
   }
    @IBAction func closeAction(_ sender: UIButton) {
        UIView.animate(withDuration: 0.4) {