| | |
| | | commonAlertView.label_content.numberOfLines = 0 |
| | | commonAlertView.label_content.textAlignment = .center |
| | | commonAlertView.cancelClouse = cancelClouse |
| | | commonAlertView.btn_close.setTitle(completeTitle, for: .normal) |
| | | commonAlertView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | |
| | | commonAlertView.btn_complete.isHidden = true |
| | |
| | | } |
| | | } |
| | | |
| | | static func show(content:String,completeTitle:String? = nil,completeClouse:@escaping()->Void,cancelClouse:@escaping (()->Void)){ |
| | | let commonAlertView = CommonAlertView.jq_loadNibView() |
| | | sceneDelegate?.window?.addSubview(commonAlertView) |
| | | commonAlertView.label_content.text = content |
| | | commonAlertView.label_content.numberOfLines = 0 |
| | | commonAlertView.label_content.textAlignment = .center |
| | | commonAlertView.cancelClouse = cancelClouse |
| | | commonAlertView.btn_complete.setTitle(completeTitle, for: .normal) |
| | | commonAlertView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | |
| | | commonAlertView.clouse = completeClouse |
| | | |
| | | |
| | | |
| | | UIView.animate(withDuration: 0.4) { |
| | | commonAlertView.alpha = 1 |
| | | commonAlertView.view_container.transform = .init(translationX: 1.0, y: 1.0) |
| | | commonAlertView.layoutIfNeeded() |
| | | } |
| | | } |
| | | |
| | | @IBAction func closeAction(_ sender: UIButton) { |
| | | UIView.animate(withDuration: 0.4) { |
| | | self.alpha = 0 |