I have such a storyboard
-> NavigationController β LoginView β TabBarController β VC1 β VC2
I was not able to make the "transition" from VC1 to VC2, while maintaining the tab bar.
I tried the following:
Segue (show type)
self.performSegueWithIdentifier("toVC2segue", sender: self)
create program files:
// prepare for future display let storyboard = UIStoryboard(name: "Main", bundle: nil) let navigationVC = UIApplication.sharedApplication().keyWindow?.rootViewController as! UINavigationController // prepare next view let vc = storyboard.instantiateViewControllerWithIdentifier("VC2id") self.tabBarController?.navigationController?.pushViewController(vc, animated: true)
but both of them cause the tab bar to disappear.
I also tried
self.hidesBottomBarWhenPushed = false
but that didnβt change anything.
Do you have another idea?
PS: I updated my diagram above ...
Edit: after reading the answers below, I tried to add another navigation controller:
-> NavigationController β LoginView β TabBarController β NavigationController β VC1 β VC2
but now I have two navigation bars superimposed on VC1 and VC2 ...
source share