 
     override func viewDidLoad() {
         super.viewDidLoad()
-        self.loadUrl(url)
-
-        self.webView.delegate = self
-        self.webView.translatesAutoresizingMaskIntoConstraints = false
-        self.webView.backgroundColor = .white
-        self.view.addSubview(webView)
+        webView.navigationDelegate = self
+        loadUrl(url)
+        webView.translatesAutoresizingMaskIntoConstraints = false
+        webView.backgroundColor = .white
+        view.addSubview(webView)
         PXLayout.pinLeft(view: webView).isActive = true
         PXLayout.pinRight(view: webView).isActive = true
         PXLayout.pinBottom(view: webView).isActive = true

        self.navBarTitle = navigationBarTitle
        self.forceAddNavBar = forceAddNavBar
        self.loadingVC = PXLoadingViewController()
        self.webView = UIWebView(frame: .zero)
        super.init(nibName: nil, bundle: nil)
    }


            loadingVC.dismiss(animated: false, completion: nil)
        } else {
            let requestObj = URLRequest(url: url)
            webView.load(requestObj)
        }
    }
}

extension WebViewController: WKNavigationDelegate {
    func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
        loadingVC.dismiss(animated: false, completion: nil)
    }
}

