由于我使用基于选项卡的应用程序启动我的应用程序,现在我想禁用整个选项卡栏,我该如何实现?这是我在 Appdelegate 中的代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
UIViewController *viewController3=[[temptable alloc]initWithNibName:@"temptable" bundle:nil];
UIViewController *viewController4=[[about alloc]initWithNibName:@"about" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2,viewController3,viewController4, nil];
self.window.rootViewController=[self tabBarController];
//self.window.rootViewController =viewController2;
[self.window makeKeyAndVisible];
return YES;
}
我只想隐藏整个标签栏,并希望viewController2
使用导航控制器作为主页。有人可以帮忙吗?