[英]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.