 //  Copyright (c) 2015 Myles Ringle & Sam Vermette. All rights reserved.
 //
 
-import UIKit
-
-public class SwiftWebVC: UIViewController, UIWebViewDelegate {
-    
-    weak var delegate: UIWebViewDelegate? = nil
+import WebKit
+
+public class SwiftWebVC: UIViewController {
+    
     var storedStatusColor: UIBarStyle?
     var buttonColor: UIColor? = nil
     var titleColor: UIColor? = nil

        }
    }
    
    ////////////////////////////////////////////////
    // UIWebViewDelegate
    
    public func webViewDidStartLoad(_ webView: UIWebView) {
        UIApplication.shared.isNetworkActivityIndicatorVisible = true
        updateToolbarItems()
    }
    
    
    public func webViewDidFinishLoad(_ webView: UIWebView) {
        UIApplication.shared.isNetworkActivityIndicatorVisible = false
        
        navBarTitle.text = webView.stringByEvaluatingJavaScript(from: "document.title")
        navBarTitle.sizeToFit()
        
        updateToolbarItems()
    }
    
    public func webView(_ webView: UIWebView, didFailLoadWithError error: Error) {
        UIApplication.shared.isNetworkActivityIndicatorVisible = false
        updateToolbarItems()
    }
    
    public func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebViewNavigationType) -> Bool {
        return true;
    }
    
    
    ////////////////////////////////////////////////
    // Target Actions

    }()
    
    
    lazy var webView: WKWebView = {
        var tempWebView = WKWebView(frame: UIScreen.main.bounds)
        tempWebView.uiDelegate = self;
        tempWebView.navigationDelegate = self;
        return tempWebView;
    }()
    
