I’ve set a delegate method that starts animating a UIActivityIndicatorView when a UIWebView starts loading and stops animating it when the UIWebView stops loading. NSLogging shows that both delegate methods are being called (i.e., webViewDidStartLoading and webViewDidFinishLoading).
- (void)webViewDidStartLoad:(UIWebView *)webView{
//start animating
[self.indicator startAnimating];
}
-(void)webViewDidFinishLoad:(UIWebView *)webView{
//finish animating
[self.indicator stopAnimating];
}
The problem is that the page finishes loading before the UIActivityIndicatorView shows up. This means that either a) everything is working fine and my connection is quick enough that the UIActivityIndicatorView doesn’t need to show up or b) not everything is working fine.
But how do I tell whether it’s a) or b)? Is there a way to slow down my connection artificially?
I would comment out your call to stopAnimating and see if your activity indicator view is still spinning. If it is then you know its your request that is super quick.
Or change the URL to load a webpage that you know takes a long time to load and see if you notice any difference.