使用UINavigationController pushViewController:animated:推送UITabBarController

时间:2014-09-12 10:19:36

标签: ios objective-c cocoa-touch

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];

此处cachedAssetBrowserUINavigationController个实例,tabBarControllerUITabBarController

所以很明显"可能"将UITabBarController推送到UINavigationController的堆栈,但为什么文档说明这个"不能"这样做会有什么陷阱?

1 个答案:

答案 0 :(得分:0)

我已经在以下链接中提供了一个解决方案。请检查一次。 How do you Show tabbar after Signup or login iOS7