Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to know when UITableView-reloadData finished?

I'm calling reloadData on my table view and once it is done, I need to select a particular cell, how do I know when the reloadData is finished so I can do the select?

iPhoneOS 3.1 & 3.2

Posted on Sep 30, 2010 7:55 AM

Reply
4 replies

Sep 30, 2010 11:11 AM in response to danielt63

Instead of directly calling selectRowAtIndexPath, try performing the selector after a delay. The delay could just be 0.


- (void) selectRowAtIndexPath:(NSIndexPath *) path {
// Replace animated and scrollPos with the values you want to use
[tableView selectRowAtIndexPath:path animated:animated scrollPosition:scrollPos];
}
- (void) foo {
[tableView reloadData];
[self performSelector:@selector(selectRowAtIndexPath:) withObject:indexPath afterDelay:0.0];
}



-TRS

How to know when UITableView-reloadData finished?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.