[英]How to show tabBar then segue to other viewController and return to this?
I have some viewControllers, I show the first viecontroller in tabBarController. 我有一些viewControllers,我在tabBarController中显示了第一个viecontroller。 Then I show other viewCOntroller from a button.
然后,我从一个按钮显示其他viewCOntroller。 The next viewController haven't tabBar, but if I want return to the first viewController in TabBar this not whow the tabBar.
下一个viewController还没有tabBar,但是如果我想返回TabBar中的第一个viewController,那不是tabBar了。
Can't I use this code: 我不能使用以下代码:
myviewController *viewController = [[UIStoryboard storyboardWithName:@"Vista1" bundle:nil] instantiateViewControllerWithIdentifier:@"vist2"];
[self.navigationController pushViewController:viewController animated:NO];
How can I declare a instantiation of tabBar index 1 view? 如何声明tabBar索引1视图的实例化? How can I solve this and show the firstView how first time was showed?
如何解决此问题并显示firstView第一次显示的方式?
Thanks! 谢谢!
You can use this to return to the number one viewController for example. 例如,您可以使用它返回第一个viewController。
[self.tabBarController setSelectedIndex:0];
you can specify the desired index of the tabBar controller 您可以指定tabBar控制器的所需索引
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.