title: Migrating from UIWebView to WKWebView
body: <p>in my app I'm migrating from UIWebView to WKWebView , how can I rewrite these function for WKWebView?</p>
  
  <pre><code>    func webViewDidStartLoad(webView: UIWebView){}
      func webViewDidFinishLoad(webView: UIWebView){}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>    func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, navigationType: UIWebViewNavigationType) -&gt; Bool {
          print("webview asking for permission to start loading")
          if navigationType == .LinkActivated &amp;&amp; !(request.URL?.absoluteString.hasPrefix("http://www.myWebSite.com/exemlpe"))!{
              UIApplication.sharedApplication().openURL(request.URL!)
              print(request.URL?.absoluteString)
              return false
          }
          print(request.URL?.absoluteString)
          lastUrl = (request.URL?.absoluteString)!
  
          return true
      }
  
  
      func webView(webView: UIWebView, didFailLoadWithError error: NSError?) {
          print("webview did fail load with error: \(error)")
          let testHTML = NSBundle.mainBundle().pathForResource("back-error-bottom", ofType: "jpg")
          let baseUrl = NSURL(fileURLWithPath: testHTML!)
  
          let htmlString:String! = "myErrorinHTML"
          self.webView.loadHTMLString(htmlString, baseURL: baseUrl)
      }
  </code></pre>