0
votes

I have a tabBarController with 4 tabs. In the fist one I need to show an UINavigationController which has a UIView in it. When the user presses a button inside that view I need to display another UINavigationController in tab 1 replacing the old one. Is this possible? I tried using this code with no luck

UINavigationController *tableNavController = [[UINavigationController alloc] initWithNibName:@"Nav2" bundle:nil];

[[self.tabBarController selectedViewController] setView:tableNavController.view];

This replaces the view but not the controller. Please help. Thanks in advance.

1

1 Answers

0
votes

Why not just push a fresh viewController onto tab 1's navigationController?