I have a table view that gets it's data from an RSS feed. I'm trying to get my activity indicator to show while the table view is loading in my iPad app. It works fine on iPhone but the indicator never appears on the iPad. Any suggestions?
In viewDidLoad
In connectionDidFinishLoading:
Code:
@implementation ActionAlertsIpad
{
UIActivityIndicatorView *loadingIndicator;
}
In viewDidLoad
Code:
CGFloat width = CGRectGetWidth(self.view.bounds);
CGFloat height = CGRectGetHeight(self.view.bounds);
loadingIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
loadingIndicator.center = CGPointMake(width/2, height/2);
loadingIndicator.hidesWhenStopped = YES;
[self.view addSubview:loadingIndicator];
[loadingIndicator startAnimating];
In connectionDidFinishLoading:
Code:
[loadingIndicator stopAnimating];