I'm developing an iOS application, and in that app, I'm using a tab bar controller. And from within tab bar controller is navigating to another view controller. Before pushing the view controller I'm setting a property of that controller
viewController.hidesBottomBarWhenPushed = YES;
And I'm navigating to another view controller which has the tab bar at the bottom.
The problem is when I pop the view controller back to the view controller the tab bar appears in that view too. Is there a way to hide the tab bar when popping a view controller?
It'll be great if anyone can help me out with this.
Thanks in advance.
In that case viewWillAppear method will usefull. in your firstviewcontroller put this code
-(void)viewWillAppear:(BOOL)animated
{
self.tabBarController.tabBar.hidden = YES;
}
So when secondviewcontroller poped out then it will call this method and your bottom bar will be hidden .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With