I'm trying to show a fully loaded webview. I don't want the user to see the webview in the loading process. I'm handling a few webviews at a time and using webViewDidFinishLoad
makes it a lot more complex for me so I'm trying to do something like this:
while(_lastWebView.isLoading)
{
_lastWebView.hidden=YES;
}
_lastWebView.hidden=NO;
But I get this msg: void SendDelegateMessage(NSInvocation *): delegate () failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
I don't understand why is entering a loop because isLoading
returns 0 when the loading is finished.
Don't block your UI with that loop. It will stop the user from doing anything else on the main thread.
Instead, count the number of requests your webView makes, and make it visible when it's done loading.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With