【发布时间】:2011-05-12 11:40:55
【问题描述】:
我在 UINavigationController 中有一个 UITabBarController,我知道 UINavigationController 的 iOS 文档说明如下:
rootViewController
The view controller that resides at the bottom of the navigation stack. This object cannot be an instance of the UITabBarController class.
这是否意味着如果导航堆栈上已经有 UIViewControllers,那么推送一个 UITabBarController 就可以了,一旦它不是根项?
我现在有这个,除了当我弹出 UITabBarController,在任何 TabBarItems ViewController 中都没有调用 dealloc 或 viewDidUnload 时,一切似乎都很好,我需要做一些类似的事情来让 viewWillAppear 工作吗?
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
[viewController viewWillAppear:NO];
}
谢谢
【问题讨论】:
标签: ios uinavigationcontroller uitabbarcontroller