This seems to be a very simplistic issue, but I literally cannot get it working.
I have a section of my app which takes my user to a WebView displaying my site. As part of the built in ‘browser’ experience i want a UIActivityIndicator located to let the user know that the site is loading. Obviously when this is done i want the indicator to disappear.
At the minute, the activity indicator animates, but then keeps animating forever and does not stop or disappear.
The code I am using in .h is as follows;
@interface AppSupportWebsite : UIViewController <UIWebViewDelegate> {
IBOutlet UIActivityIndicatorView *activityIndicator;
}
@property (nonatomic, retain) UIActivityIndicatorView *activityIndicator;
@end
And within my .m file I have the following; (abbreviated to just show the activity indicator specific code)
@synthesize activityIndicator;
- (void)webViewDidStartLoad:(UIWebView *)webView {
[activityIndicator startAnimating];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[activityIndicator stopAnimating];
}
I have created an activity indicator within Interface Builder and through Files Owner connected the activityIndicator IBOutlet to the white activity indicator through IB but it just wont disappear.
select ur activity indicator then
cmd+1
select “hide when stopped”
check ur webview.delegate=self;