如何在UITabBarController中插入UINavigationController [英] How to insert UINavigationController inside UITabBarController
问题描述
如何在 UITabBarController
中插入 UINavigationController
。
目前我的主要 UITabBarController
在应用程序委托中使用了declatarion(所以tab是main)
Currently I have main UITabBarController
with declatarion inside application delegate like this (so tab is main)
self.window.rootViewController = self.tabBarController;
在我要插入的一个标签内 UINavigationController
,并且无法获得它。
And inside one of tabs I want to insert UINavigationController
, and can't get it.
代码构造如下:
-
MainWindow.xib
与UITabBarController
对象,其中标签键入为UINavigationController
(指向NavigationHistory.xib
) - 屏幕截图:无效链接 -
NavigationHistory.xib
仅包含UINavigationController
其中查看指向History.xib -
History.xib
只有UITableView
元素 - 截图:无效链接
MainWindow.xib
withUITabBarController
object with tab typed asUINavigationController
(point toNavigationHistory.xib
) - screenshot: invalid linkNavigationHistory.xib
contains onlyUINavigationController
where view point to History.xibHistory.xib
have onlyUITableView
element - screenshot: invalid link
现在 UIViewController
不显示我的View1视图,我不知道为什么会这样。也许你有任何线索?或者指向我完成此类配置的地方。
And now UIViewController
doesn't display my View1 view, and I have no clue why it may be. Maybe you have any clue? or point me to the place where such configuration is done.
推荐答案
I'll answer myself. It's good explained at https://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewControllerCatalog/Chapters/CombiningViewControllers.html
这篇关于如何在UITabBarController中插入UINavigationController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!