//
//  DetailViewController.swift
//  SHZX
//
//  Created by 曹云霄 on 2018/3/8.
//  Copyright © 2018年 上海勾芒信息科技有限公司. All rights reserved.
//

import UIKit
import WebKit

class DetailViewController: UIViewController {
    
    final var webView: WKWebView!
    open var imageString: String!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setupWebView()
    }
    
    // MARK: - 初始化WKWebView
    fileprivate func setupWebView() {
        webView = WKWebView(frame: CGRect(x: 0, y: 64, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height))
        view.addSubview(webView)
        view.sendSubview(toBack: webView)
        webView.load(URLRequest(url: URL(string: imageString)!))
    }
    
    // MARK: - 关闭
    @IBAction func dismissClickAction(_ sender: UIButton) {
        dismiss(animated: true, completion: nil)
    }
}








