开发者

Changing UINavigationController from UItabBarController

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 *t开发者_开发百科ableNavController = [[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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜