Remove Tab Bar When Controller Pushed
Sometimes it’s the little tips that prove really useful, and as such, I present one today. This would have helped me out greatly about three months ago. If you have a UITabBarController, and you’re pushing a new controller in a UINavigationController which is one of the tabs, typically the tab bar across the bottom stays in place. But you can remove it quite easily with this line of code:
controller.hidesBottomBarWhenPushed = YES; // yay! this hides the tab bar!
[self.navigationController pushViewController:controller animated:YES];
[self.navigationController pushViewController:controller animated:YES];
I just discovered this recently, and have already made use of it. Good luck.
Leave a comment