简体   繁体   中英

segue to the TabbarController

In my image, my first Tabbar is HomeViewController and the second Tabbar is CameraViewController. What is the proper way to segue to the Tabbarcontroller? You can see the read line, I try to segue this but I always get the back button in my HomeViewController and It display weird like not showing the navigation name. In CameraViewController I hide the Tabbar for the use camera button. I try to use segue programmatically like this one.

[self performSegueWithIdentifier:@"sample" sender:sender]

but It doesn't work properly. Is this possible to segue to TabbarController? 在此处输入图片说明

You can't call

[self performSegueWithIdentifier:@"sample" sender:sender]

Because you're in TabBarController already. You could implement custom flow. By pressing "Back" button - just show TabBar and change selected tabBarItem for example…

update used this

[self.tabBarController setSelectedIndex:0];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM