将当前 TabBarController 视图设置为 UINavigationcontroller 的根视图
我一直在寻找一种实现下面层次结构的好方法。
我已经完成了其他三个视图的登录和 UITabBarController
的实现。
我现在需要的是让选定的选项卡充当我即将实现的 UINavigationcontroller 中的 rootviewcontroller ,该控制器应该处理详细视图的推送和弹出。
层次结构摘要:
LoginView--
TabBarController - Holds it's own view and the three views below.
OneView (If selected should be root for UINavigationcontroller)
- DetailView (DetailView of OneView)
-DetailView (Details of detailview)
AnotherView (If selected should be root for UINavigationcontroller)
- DetailView (DetailView of AnotherView)
-DetailView (Details of detailview)
AThirdView (If selected should be root for UINavigationcontroller)
- DetailView (DetailView of AThirdView)
-DetailView (Details of detailview)
三个视图,lon、schema 和 tidsaldo 都连接到界面构建器中的 UITabBarController
。
因此,我基本上需要帮助的是一些关于如何使这三个选项卡中的任何一个成为我的 UINavigationController
的根的指南和/或技巧。
我尝试过的事情之一是抓住App Delegate
并为UINavigationController
添加当前rootviewcontroller
的子视图。但这让我以某种方式松开了标签栏。
任何提示和/或指示都将受到高度赞赏。
附言。可能有错别字。
I've been searching around for a good way to implement the hierarchy below.
I've completed the implementation of the login and the UITabBarController
for the other three views.
What i need now is for the selected tab to act as the rootviewcontroller
in my soon to be implemented UINavigationcontroller
, which is supposed to handle pushing and popping from and to the detailed views.
Hierarchy summary:
LoginView--
TabBarController - Holds it's own view and the three views below.
OneView (If selected should be root for UINavigationcontroller)
- DetailView (DetailView of OneView)
-DetailView (Details of detailview)
AnotherView (If selected should be root for UINavigationcontroller)
- DetailView (DetailView of AnotherView)
-DetailView (Details of detailview)
AThirdView (If selected should be root for UINavigationcontroller)
- DetailView (DetailView of AThirdView)
-DetailView (Details of detailview)
The three views, lon, schema and tidsaldo are all connected to the UITabBarController
in the interface builder.
So, what i basically need help with, is some guidelines and/or tips on how to make either of those three tabs the root for my UINavigationController
.
What i've tried among other things is to grab hold of the App Delegate
and adding the subview of the current rootviewcontroller
for the UINavigationController
. But that makes me loose the tabbar somehow.
Any tips and/or pointers are highly appreciated.
PS. There might be typos.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过在
Tabbarcontroller
中添加Navigationcontrollers
而不是Viewcontrollers
来解决。Solved by adding
Navigationcontrollers
in theTabbarcontroller
instead ofViewcontrollers
.