Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

KimGysen

macrumors newbie
Original poster
Oct 1, 2012
9
0
Brussel, Belgium
have this code where I want to add a TabBar during the entire lifetime of the app.

Code:
UINavigationController *container = [[UINavigationController alloc] init];
[container setNavigationBarHidden:YES animated:NO];
[container setViewControllers:[NSArray arrayWithObject:navController] animated:NO];

self.container2 = [[UIView alloc]initWithFrame:CGRectMake(0,self.view.frame.size.height-148, 320, 80)];
self.tabBar = [[TabBarViewController alloc]init]; //Instantiates Controller adding a tabBar with custom buttons as a Subview; 
[self.container2 addSubview:self.toolBar.view];
[container.view addSubview:self.container2];
self.window.rootViewController = container;

However, what I need is to change the items when I push a new ViewController on the NavigationViewController stack and I can't figure it out. How can I achieve this? And some views should hide the tabBar entirely when pushed.

Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.