Hi Everyone,
The login of my app is on web. I have a loading screen first and then I want to show the WKWebView if the login URL has finished loading.
If you have set the NavigationDelegate, DidFinishNavigation(WKWebView webView, WKNavigation navigation) will be fired when it finished loading web page.
Define the delegate:
public class WKWebViewDelegate : WKNavigationDelegate { public override void DidFinishNavigation(WKWebView webView, WKNavigation navigation) { } }
Set it to your wkwebView:
WKWebView webView = new WKWebView(new CGRect(0, 0, 400, 400), new WKWebViewConfiguration()); webView.NavigationDelegate = new WKWebViewDelegate(); View.AddSubview(webView);
Answers
If you have set the NavigationDelegate, DidFinishNavigation(WKWebView webView, WKNavigation navigation) will be fired when it finished loading web page.
Define the delegate:
Set it to your wkwebView:
@LandLu got the answer. You're correct, btw. Thanks for your input