| | |
| | | |
| | | @IBOutlet weak var label_title: UILabel! |
| | | @IBOutlet weak var view_container: UIView! |
| | | @IBOutlet weak var webView: WKWebView! |
| | | // @IBOutlet weak var webView: WKWebView! |
| | | @IBOutlet weak var bottom_cons: NSLayoutConstraint! |
| | | @IBOutlet weak var label_content: UILabel! |
| | | private var type:AgreentType! |
| | | private var content:String? |
| | | private let disposeBag = DisposeBag() |
| | | |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | | webView.backgroundColor = .white |
| | | bottom_cons.constant = -(JQ_ScreenH - JQ_ScreenW * 0.9) |
| | | bottom_cons.constant = -(JQ_ScreenH - JQ_ScreenW * 0.69) |
| | | layoutIfNeeded() |
| | | } |
| | | |
| | |
| | | alertView.layoutIfNeeded() |
| | | } |
| | | |
| | | let attributed = AttributedStringbuilder.build() |
| | | |
| | | if type != .other && type != .matchStore{ |
| | | Services.queryProtocol(type,progress: false).subscribe(onNext: { result in |
| | | if let text = result.data?.jq_wrapHtml(){ |
| | | alertView.webView.loadHTMLString(text, baseURL: nil) |
| | | attributed.add(string: text, withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "727272"), lineSpace: 4) |
| | | } |
| | | }).disposed(by: alertView.disposeBag) |
| | | }else{ |
| | | alertView.webView.loadHTMLString(content?.jq_wrapHtml() ?? "", baseURL: nil) |
| | | attributed.add(string: content!, withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "727272"), lineSpace: 4) |
| | | } |
| | | alertView.label_content.attributedText = attributed.mutableAttributedString |
| | | alertView.label_content.textAlignment = .center |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @IBAction func completeAction(_ sender: UIButton) { |
| | | bottom_cons.constant = -(JQ_ScreenH - JQ_ScreenW * 0.9) |
| | | bottom_cons.constant = -(JQ_ScreenH - JQ_ScreenW * 0.69) |
| | | UIView.animate(withDuration: 0.4) { |
| | | self.layoutIfNeeded() |
| | | self.alpha = 0 |