UIWebView finishes too fast
Posted
by Dan Ray
on Stack Overflow
See other posts from Stack Overflow
or by Dan Ray
Published on 2010-05-11T18:30:42Z
Indexed on
2010/05/11
18:34 UTC
Read the original article
Hit count: 382
I'm loading a biggish (and javascript-heavy) page into a UIWebView, and I want to add a UIActivityView to spin while it thinks.
Problem is, my - (void)webViewDidFinishLoad:(UIWebView *)webView
method gets called quite a while before the rendering actually happens. Enough so that my spinner (which set to hide when stopped) never actually shows up. By the time the UI is even assembled, the spinner has already been stopped and hidden, even though there's enough time to wonder if it's broken before the UIWebView actually gets the goods to the screen.
I wish there was a "webViewDidFinishRendering", but that would imply that WebKit is something other than lickedy-split fast... ;-)
Thoughts? Perhaps I should toss the thing up and set a timer to come stop it, and unhook that from anything that's actually happening in the WebView?
© Stack Overflow or respective owner