简体   繁体   English

从导航栏视图控制器导航到选项卡栏视图控制器

[英]Navigate from a navigation bar view controller to a tab bar view controller

What is wrong with this approach? 这种方法有什么问题? There is no coding behind it. 其后没有任何编码。 But, I cannot see the item nor the title of the last scene on the right (as their titles are set to "cannot see"). 但是,我看不到项目或右边最后一个场景的标题(因为它们的标题设置为“看不到”)。

Even if I add a back button, and set it's title to something, it keeps showing the default back button. 即使我添加了后退按钮并将其标题设置为某些内容,它仍会显示默认的后退按钮。

The storyboard 故事板

You are pushing UITabBarViewController instance in to UINavigationViewController stack. 您正在将UITabBarViewController实例推入UINavigationViewController堆栈中。 In such case navigation bar is managed by UINavigationController that is way you don't see "Cannot see" UIBarButtonItem in the nav bar. 在这种情况下,导航栏由UINavigationController管理,这是您在导航栏中看不到“无法看到” UIBarButtonItem的方式。

UITabBarViewController works best if it is the rootViewController of the application. 如果UITabBarViewController是应用程序的rootViewController,则效果最好。 Take a look at this unswear to see how UITabBarViewController should be used. 看看这个烂摊子 ,看看应该如何使用UITabBarViewController。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从选项卡栏控制器触发导航控制器中的视图控制器 - Trigger view controller in a navigation controller from tab bar controller 在视图控制器之间导航的自定义选项卡栏 - Custom Tab Bar To Navigate Between View Controller 从标签栏按钮将视图控制器推到导航控制器上 - Pushing a view controller onto a navigation controller from a tab bar button 旧的导航栏和标签栏控制器的视图控制器问题 - View controller problems with old navigation bar and tab bar controller 为什么将视图控制器嵌入导航控制器,然后在选项卡栏控制器中将导航栏附加到选项卡栏控制器? - Why does embedding a View Controller in a Navigation Controller, then in a Tab Bar Controller attach the nav bar to the Tab Bar Controller? 从视图控制器移动到标签栏控制器 - Move from view controller to tab bar controller 如何导航到标签栏控制器中嵌入的View Controller - How to navigate to a View Controller embedded in tab bar controller 如何从嵌入在导航控制器中的简单视图控制器调用标签栏视图控制器? - How to call tab bar view controller from simple view controller which is embedded in navigation controller? 如何在导航栏、标签栏、视图控制器之间传递数据 - How to pass data among Navigation bar, Tab bar, View Controller 如何使用标签栏项添加导航栏以查看控制器 - How to add Navigation bar to view controller with tab bar item
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM