My current hierarchy is:
Tab bar controller
Navigation controller
UIViewController
UIViewController
It shows tab bars at the second UIViewController
(so number 4 in the list). I want to remove that tab bar, but I want to keep the navigation at the top. This is because the first UIViewController
(number 3 in the list) holds a tableview
, and when a user clicks on a cell it goes to the second UIViewController
and I want to keep a back button.
An example is when you open WhatsApp, you have a list of conversations (left side of image). When you click on a conversation, the tab bar buttons at the bottom are gone (right side of image). I can hide them in the second UIViewController
, but it causes some glitches. I am sure there is a better solution.
In presented/pushed viewController's viewDidLoad
, or in the storyboard, set the view controller's hidesBottomBarWhenPushed
to true
.