If you are using the iPhone Tab Bar in your application, but you need to hide the Tab Bar in any specific situation. And you’re using (Three20h) to manage yours View Controllers. This is a very easy task.
Let’s assume that you want to hide the Tab Bar when push the view to the controller. Follow this steps:
- First, add the to your class.
- Second, add your class as delegate of . One good place to put this code is your initmethod:
// Delegation from TTNavigator. [[TTNavigator navigator] setDelegate:self];
- Third, add the method to your code. This method will be called before the view been pushed. So you have enough time to configure some properties of him. The property that we want to edit is the . So we’ll have this piece of code:
-(void)navigator:(TTBaseNavigator *)navigator willOpenURL:(NSURL *)URLinViewController:(UIViewController *)controller{ controller.hidesBottomBarWhenPushed = YES;}
You’re done. This code wil hide the Tab Bar when the view has been pushed and
automatically will show the Tab Bar back when the view has been popped.