use UINavigationController inside a UITabBarController
程序员文章站
2022-03-02 10:49:00
...
If you want to add a UINavigationController into a TabView, and while the tab was taped,turn current view to display rootView of the UINavigationController.Keep following principles.
1,Don't put the view which is expected to display into TabView straightly.
2,Instead of 1,wrap the view by a NavigationController,then put the NavigationController into TabView.
1,Don't put the view which is expected to display into TabView straightly.
2,Instead of 1,wrap the view by a NavigationController,then put the NavigationController into TabView.
loginViewController = [[[LoginViewController alloc] init]autorelease];
loginViewController.title = @"Setting";
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController2] ;
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, navigationController,loginViewController, nil];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
上一篇: Java中的23种设计模式详解
推荐阅读
-
Note that the "use" operator for traits (inside a class) and the "use" operator for namespaces (outs...
-
UITabBarController与UINavigationController混合开发
-
UIViewController、UINavigationController与UITabBarController的整合使用
-
UITabbarController + UINavigationController隐藏tabbar
-
UINavigationController和UITabBarController
-
swift UITabBarController 嵌套 UINavigationController
-
Swift - 使用UITabBarController UINavigationcontroller搭建项目
-
快速改变UINavigationController和UITabBarController相关属相的方法
-
UITabBarController和UINavigationController的自定义
-
UINavigationController和UITabBarController合用。