Monday, August 27, 2012

UIWebview.loading in iOS 6 fixed


Apple changed (or fixed) UIWebView.loading property in iOS 6 (Beta).

Details:
When you load a page with multiple frames, (void)webViewDidFinishLoad:(UIWebView *)webView is notified multiple times. On that notification, if you check uiwebView.loading property

In iOS 6 (beta 4): 
You will get loading == YES, until all the frames are loaded.
// And that's more intuitive

In iOS 5:
You will get loading == NO on the very first frame completion. 
// So it was rather hard to know when all the frames are done loading.

So now showing a spinner until webview is fully loading should be more reliably shown.