Следующий код может помочь вам ...
в .h файле UITableView2:
объявить переменную
UIActivityIndicatorView *progressInd;
создать свойство
@property (nonatomic, retain) UIActivityIndicatorView *progressInd;
и объявить метод
- (UIActivityIndicatorView *)progressInd;
в .m файле UITableView2:
@synthesize progressInd;
определить этот метод (настроить x, y, ширину, ширину, положение)
- (UIActivityIndicatorView *)progressInd {
if (progressInd == nil)
{
CGRect frame = CGRectMake(self.view.frame.size.width/2-15, self.view.frame.size.height/2-15, 30, 30);
progressInd = [[UIActivityIndicatorView alloc] initWithFrame:frame];
[progressInd startAnimating];
progressInd.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
[progressInd sizeToFit];
progressInd.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin |
UIViewAutoresizingFlexibleTopMargin |
UIViewAutoresizingFlexibleBottomMargin);
progressInd.tag = 1; // tag this view for later so we can remove it from recycled table cells
}
return progressInd;
}
в - (void)viewDidLoad
метод, с которого начинается ваш анализ
[self.view addSubview:self.progressInd];
используйте следующую строку, где ваш анализ заканчивается
[self.progressInd removeFromSuperview];