如何在UITabBarController中插入UINavigationController [英] How to insert UINavigationController inside UITabBarController

查看:85
本文介绍了如何在UITabBarController中插入UINavigationController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 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.

代码构造如下:


  1. MainWindow.xib UITabBarController 对象,其中标签键入为 UINavigationController (指向 NavigationHistory.xib ) - 屏幕截图:无效链接

  2. NavigationHistory.xib 仅包含 UINavigationController 其中查看指向History.xib

  3. History.xib 只有 UITableView 元素 - 截图:无效链接

  1. MainWindow.xib with UITabBarController object with tab typed as UINavigationController (point to NavigationHistory.xib) - screenshot: invalid link
  2. NavigationHistory.xib contains only UINavigationController where view point to History.xib
  3. History.xib have only UITableView 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.

推荐答案

我会自己回答。这是很好的解释
https: //developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewControllerCatalog/Chapters/CombiningViewControllers.html

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆