I have a menu based navigation. The menu is a tableView. Everytime a user presses one entry in that table I want to switch to another viewcontroller, and if there is any view pushed I want to clean the navigation stack first.
This is what I am doing
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[(UINavigationController *)self.tabBar.selectedViewController popToRootViewControllerAnimated:YES];
self.tabBar.selectedIndex = indexPath.row;
}
But
self.tabBar.selectedIndex = indexPath.row;
Dont let the popToRoot animation finish. Is there any way to know when the animation is done?
Thanks