【发布时间】:2017-11-15 07:18:05
【问题描述】:
我的应用程序代表:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UITabBarController *tabBarController = [storyboard instantiateViewControllerWithIdentifier:@"rootTabBarVC"];
self.window.rootViewController = tabBarController;
return YES;
}
我有侧边菜单,我正在按如下方式推送 VC1:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
VC1 *contr = [storyboard instantiateViewControllerWithIdentifier:@"VC1"];
[self.navCon pushViewController:contr animated:YES];
我的问题是:VC1 正在推送,但标签栏被隐藏了。那么,任何人都可以帮我在推送VC时显示标签栏吗?
【问题讨论】:
-
尝试将tabBar为根的初始导航控制器作为窗口的rootviewController
-
选择VC1索引的Push Tabbarcontroller
-
您正在将导航控制器的根视图控制器设置为 TabBarController...any 视图然后推送到导航控制器堆栈将“推出”您的 TabBarController。当然,这不是你想要的,不是吗?
标签: ios objective-c navigationbar tabbar