I have an application that works some what similar to how iPhone’s Contact application works. When we add a new Contact user is directed to a view only screen with Contact information. If we select ‘All Contacts’ from the navigation bar, user is navigated to list of all contacts where the recently added contact is in view.
We can move the view to a particular row using:
[itemsTableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionBottom];
… but it’s not working. I’m calling this right after calling:
[tableView reloadData];
I think I’m not suppose to call selectRowAtIndexPath:animated:scrollPosition method here. But if not here, then where?
Is there any delegate method that gets called after the following method?
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
I think I’ve got a similar app: A list of item., tap ‘+’ -> new screen, come back and see the updated list, scrolled to show the added item at the bottom.
In summary, I put
reloadDatainviewWillAppear:animated:andscrollToRowAtIndexPath:...inviewDidAppear:animated:.I hope this helps. If you add something in the middle of the list, you could easily scroll to that position instead.