Jugs Jugs - 1 year ago 121
Objective-C Question

Hide the top bar in UITabBarController

How do I hide the top bar in UITabBarController using OBJ-C code (without using Interface Builder) ?

Please see the image in the link below to better understand my requirement.


I already have another toolbar as you can see and I don't want this. I'm not using XIB / NIB files and creating all the objects using plain OBJ-C code.


Answer Source

The topBar is part of the UINavigationController not the UITabBarController, you can hide it by putting the following in your viewWillAppear method:

self.navigationController.navigationBarHidden = YES;

But I'm pretty sure the navigationBar is always on top, so I think the bar you want to hide is actually your own toolbar.

self.myToolBar.hidden = YES;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download