My code looks like this:
NSIndexPath *ip = [NSIndexPath indexPathForRow:15 inSection:0];
[[self tableView] selectRowAtIndexPath:ip animated:YES scrollPosition:UITableViewScrollPositionMiddle];
// Pause needed here until animation finishes
[[self navigationController] pushViewController:secondView animated:YES];
Right now it animates the scroll/selection of the row and pushes the view controller at the same time. What I would like it to do is wait until it finishes the scroll/selection and then push the view controller. Is there any possible way of doing this? Thanks
The tableview should call scrollViewDidEndScrollingAnimation when the scrolling ends. Try putting the push in that method:
You might need to use a bool ivar that you set to YES right after the selectRowAtIndexPath because the scrollViewDidEndScrollingAnimation may be called at other times for other scrolls.