Let try the TableView Footer View to show an activity indicator.
For example:
Declare UIView * footerView; in .h file
Add the following methods to the file.m
- (void)viewDidLoad { [super viewDidLoad]; [self initFooterView]; } -(void)initFooterView { footerView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 40.0)]; UIActivityIndicatorView * actInd = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; actInd.tag = 10; actInd.frame = CGRectMake(150.0, 5.0, 20.0, 20.0); actInd.hidesWhenStopped = YES; [footerView addSubview:actInd]; actInd = nil; } -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { BOOL endOfTable = (scrollView.contentOffset.y >= ((self.contentArray.count * 40) - scrollView.frame.size.height));
Thanks!
Natarajan
source share