Reputation: 11157
I have a UITabBarController with multiple tabs. When i push a viewController that is a gallery, i hide the tab bar using self.hidesBottomBarWhenPushed = YES
but i need to navigate from this gallery to another view controller and the tab bar controller should be displayed.
I acomplish this by setting self.hidesBottomBarWhenPushed = NO
in the gallery before pushing the new view controller. The trouble is that when i go back to the gallery, the tab bar controller is visible. How can i hide it again for the gallery?
Upvotes: 1
Views: 2055
Reputation: 974
In the -(void) viewWillAppear
method, add this line to hide the tabbar:
[[[self navigationController] tabBarController] tabBar].hidden = YES;
Upvotes: 3
Reputation: 7583
I suppose you could set the MyTabBarController.view.hidden property to YES when you go back to your gallery and load it.
Upvotes: 0
Reputation: 1108
You can add show and hide code in proper views delegate method viewWillAppear
Upvotes: 0