iOS 开发-如何监测Tableview loaddata结束

找了好久没有找到官方的方法,在stackflow上有人给出了这样的想法:
在将要显示最后一个cell的时候,其实也就是reloaddata结束的时候,再进行操作。
原文stackoverflow地址:
http://stackoverflow.com/questions/4163579/how-to-detect-the-end-of-loading-of-uitableview

-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if([indexPath row] == ((NSIndexPath*)[[tableView indexPathsForVisibleRows] lastObject]).row){
        //end of loading
        //for example [activityIndicator stopAnimating];
    }
} 

你可能感兴趣的:(iOS 开发-如何监测Tableview loaddata结束)