Get notified when UITableView has finished asking for data?

This answer doesn’t seem to be working anymore, due to some changes made to UITableView implementation since the answer was written. See this comment : Get notified when UITableView has finished asking for data?

I’ve been playing with this problem for a couple of days and think that subclassing UITableView‘s reloadData is the best approach :

- (void)reloadData {

    NSLog(@"BEGIN reloadData");

    [super reloadData];

    NSLog(@"END reloadData");

}

reloadData doesn’t end before the table has finish reload its data. So, when the second NSLog is fired, the table view has actually finish asking for data.

I’ve subclassed UITableView to send methods to the delegate before and after reloadData. It works like a charm.

Leave a Comment