Reputation: 11519
I have application with 2 tab bars. In second tab bar I have navigation controller. I want to change this navigation controller to another navigation controller when "Change" button is pressed. How can I do that? Please help me.
Thanks
Upvotes: 0
Views: 2702
Reputation: 100701
You'd have to replace the View Controller in the TabBar using the viewControllers
property of UITabBarController
or setViewControllers:animated:
if you want to add some animation.
But maybe you should think of having 2 views in a controller of yours and hide/show them when you click a button, maybe even pushing/popping view controllers without animation (pushViewController:yourController animated:NO
) on the navigation stack of your navigation controller and just hide the back button (self.navigationItem.hidesBackButton = YES
)
Upvotes: 2