NavigationController 中的 TabBarController 在 vi​​ewControllers 中不显示 TabBar [英] TabBarController in NavigationController does not show TabBar in viewControllers

查看:15
本文介绍了NavigationController 中的 TabBarController 在 vi​​ewControllers 中不显示 TabBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 UITabBarController,我想在它的控制器上附加导航.所以我插入了 NavigationController 作为入口控制器,并将 tabBarController 作为其根.一切似乎都很好,但对于 tabBar.基本上它没有显示,尽管我附加的 StoryBoard 似乎有不同的说法.我还附上了没有显示任何导航栏的帐户屏幕,当然也没有显示任何后退按钮.

I have a UITabBarController to whose controllers I would like to attach navigation. So I inserted the NavigationController as the entry controller, and the tabBarController as its root. All seems working fine, but for the tabBar. Basically it does not show, albeit the StoryBoard I attach seems to say differently. I also attach the Account Screen not showing any navigation bar nor, of course, any back button.

谢谢,法布里齐奥

推荐答案

只是一个快速的答案.我认为您应该将 UINavigationController 放在 TabBarController 中,而不是相反.它将解决您的大部分问题.

Just a quick answer. I think you should put UINavigationController inside the TabBarController instead of the other way round. It will solve most of your problems.

步骤:编辑器 -> 嵌入 -> 导航控制器

有关如何将导航控制器添加到视图控制器的信息,请参阅以下屏幕截图.

See the below screen shot on how to add a Navigation Controller to a View Controller.

这篇关于NavigationController 中的 TabBarController 在 vi​​ewControllers 中不显示 TabBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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