// // ApplyCardebViewTViewController.swift // xingchuangke // // Created by Apple on 2020/10/24. // Copyright © 2020 Virgil. All rights reserved. // import UIKit class ApplyCardebViewTViewController: BaseViewController { lazy var wkWebView: WKWebView = { () -> WKWebView in let config = WKWebViewConfiguration.init() let wkWebView = WKWebView.init(frame: CGRect.zero, configuration: config) return wkWebView }() var urlStr = "" var titlet = "" override func viewDidLoad() { super.viewDidLoad() initNavLeftBackButton() self.title = titlet wkWebView.frame = self.view.bounds self.view.addSubview(wkWebView) wkWebView.load(URLRequest(url: URL(string: urlStr)!)) // initNavRightButtonForImage(imgName: "share_common") // Do any additional setup after loading the view. } override func handleBack() { if wkWebView.canGoBack { wkWebView.goBack() } else { super.handleBack() } } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.tabBarController?.title = self.title } override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { super.init(nibName: "ApplyCardebViewTViewController", bundle: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }