简体   繁体   English

在标签栏中推送View Controller

[英]Push view Controller in the tab bar

主标签栏控制器

I have three tab bar items in the tab bar now, and I want to let the second one push a navigation controller instead of the default effect. 我现在在选项卡栏中有三个选项卡栏项目,我想让第二个选项卡按导航控制器而不是默认效果。 I've tried put self.navigationController?.tabBarController?.tabBar.isHidden = true in viewWillAppear and it didn't work very well. 我试过在viewWillAppear放置self.navigationController?.tabBarController?.tabBar.isHidden = true ,但效果不是很好。

Any help is appreciated! 任何帮助表示赞赏!

From the image it's clear you are using storyboards. 从图中可以清楚地看到您正在使用情节提要。 Select the second view controller, the one that you want to navigate to. 选择第二个视图控制器,您要导航到的那个。 Then from the file menu select Editor-> Embed in -> Navigation controller. 然后从文件菜单中选择编辑器->嵌入->导航控制器。 Select the segue and then select the segue type as push. 选择segue,然后将segue类型选择为push。 That should do it. 那应该做。

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

相关问题 从AppDelegate和Tab Bar推送View Controller - Push View Controller From AppDelegate and Tab Bar 推回标签栏的视图控制器后,标签栏消失 - Tab bar disappears after push back to a view controller of the tab bar 如何将视图控制器推送到iOS中标签栏中的导航控制器 - how to push a view controller to a navigation controller in a tab bar in iOS 从选项卡栏中的应用程序委托推送View Controller - Push View Controller from app delegate in tab bar 在标签栏上推送/呈现视图控制器 - push / present view controller over tab bar Swift 当根视图控制器是标签栏控制器时,如何在UILocalNotification上推送view.xib? - how to push view.xib on UILocalNotification receive when Root view controller is Tab bar controller? 删除推式视图上的标签栏 - Removing Tab bar on Push view 从Tab Bar Controller推到新的Tab Bar Controller - Push from Tab Bar Controller to a new Tab Bar Controller 无法从AppDelegate推送到View Controller而不会丢失导航栏和标签栏设置iOS - Can't push to View Controller from AppDelegate without losing Navigation Bar and Tab Bar setup iOS 单击推送通知时,正确重定向到选项卡栏导航控制器内的视图控制器 - Properly redirect to a view controller inside tab bar's navigation controller when push notification is clicked
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM