UINavigationController pushViewController:animated:
选择器的文档说明视图控制器已推入接收器的堆栈" cannot be a tab bar controller"。
但是,在Apple的AVPlayerDemo sample code中,使用了这种确切的技术。来自AVPlayerDemo:
// Add the tab bar controller's current view as a subview of the window
[self.cachedAssetBrowser pushViewController:self->tabBarController animated:NO];
此处cachedAssetBrowser
是UINavigationController
个实例,tabBarController
是UITabBarController
。
所以很明显"可能"将UITabBarController
推送到UINavigationController
的堆栈,但为什么文档说明这个"不能"这样做会有什么陷阱?