I have put an activtyIndicator on my webView and connected it with the files owner. I have an rss feed from a tableView and when I click on a cell, it pushes to the webView. Just like this tutorial. RSS Tutorial
However, when the webView starts loading, the activityIndicator doesn’t appear at all. The code for my webView file for the activityIndicator is below:
-(void)webViewDidStartLoad:(UIWebView *)webView {
[activityIndicator startAnimating];
activityIndicator.hidden = NO;
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
}
-(void)webViewDidFinishLoad:(UIWebView *)webView {
[activityIndicator stopAnimating];
activityIndicator.hidden = YES;
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:FALSE];
}
Any ideas guys?
Thanks.
The most common mistake is that you forget to set the delegate of the webview:
[theWebView setDelegate: self];Do you do that already? Or, if you put any NSLog() in your
webViewDidStartLoad, do you see the output?