从UIWebView迁移到WKWebView
在我的应用程序中,我从UIWebView迁移到WKWebView,如何为WKWebView重写这些功能? func webViewDidStartLoad(webView: UIWebView){} func webViewDidFinishLoad(webView: UIWebView){} 和 func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, navigationType: UIWebViewNavigationType) -> Bool { print("webview asking for permission to start loading") if navigationType == .LinkActivated && !(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?) …