From 3279ef91fdcd6b4be45b8a4d3b3655e80a2a6939 Mon Sep 17 00:00:00 2001 From: "Xinlei(Ryan) Pan" Date: Thu, 2 Apr 2020 13:40:24 -0400 Subject: [PATCH] update did fail method --- MVMCoreUI/Atomic/Atoms/Views/WebView.swift | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/WebView.swift b/MVMCoreUI/Atomic/Atoms/Views/WebView.swift index 4244c330..1ce2b123 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/WebView.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/WebView.swift @@ -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() }