【发布时间】:2013-01-21 10:18:45
【问题描述】:
我有一个基于菜单的导航。菜单是一个tableView。每次用户按下该表中的一个条目时,我想切换到另一个视图控制器,如果有任何视图被推送,我想先清理导航堆栈。
这就是我正在做的事情
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[(UINavigationController *)self.tabBar.selectedViewController popToRootViewControllerAnimated:YES];
self.tabBar.selectedIndex = indexPath.row;
}
但是
self.tabBar.selectedIndex = indexPath.row;
不要让 popToRoot 动画结束。有什么方法可以知道动画何时完成?
谢谢
【问题讨论】:
标签: ios cocoa-touch animation uinavigationcontroller