iPhone: Waiting until selectrow animation finishes before pushing viewcontroller?

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-03-13T21:59:53Z Indexed on 2010/03/13 22:05 UTC
Read the original article Hit count: 213

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about iphone

Related posts about xcode