update did fail method

This commit is contained in:
Xinlei(Ryan) Pan 2020-04-02 13:40:24 -04:00
parent 0edc7a8f00
commit 3279ef91fd

View File

@ -148,12 +148,11 @@ extension WebView : WKUIDelegate {
}
}
public func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
// show loading
loadingSpinner.resumeSpinner()
}
public func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {
// hide loading
public func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
//actually no error handle page show in webview. We can handle the error display view by our self.
//or stop loading by default
overLayer.isHidden = true
loadingSpinner.pause()
}