I currently have a UINavigationController in my app delegate where i push a ViewController on to login. If the login is successful i want to then create a UITabBarController with a Navigation Controller as the first Tab whose root controller is a UIViewController that i am creating.
The RootViewController of my first UINavigationController is actually acting as a delegate to the logincontroller so if a user logs in correctly it calls a method in my RootViewController which is where i would then like to push a UITabBarController onto the stack. Here is my code:
UITabBarController *tbController = [[UITabBarController alloc] init]; FileBrowserViewController *fileController = [[FileBrowserViewController alloc] init]; fileController.pathToFileDB = pathToDBUnzipped; fileController.parentId = @"0"; UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:fileController]; NSMutableArray *aViewControllersArray = [[NSMutableArray alloc] initWithCapacity:2]; [aViewControllersArray addObject:navController]; [navController release]; [tbController setViewControllers:aViewControllersArray]; [self.navigationController pushViewController:tbController animated:YES]; [tbController release];
Now, it is all working fine. Except 2 things. Here is the screen shot:
1) I cant see any uitabbar items. How do i set an image and the text for each tab? 2) I dont want that top black bar. I only want 1 bar ontop with the undo button. How do i remove the additional bar?
Thanks for all the help!