Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dbredesen

macrumors newbie
Original poster
Aug 17, 2008
6
0
I have had a heck of a time trying to hide the tab bar when certain tabs are selected on a UITabBarController. I have tried:

- setHidesBottomBarWhenPushed: this only works when the tab item is a UINavigationController, and this boolean is set on one of the UIViewControllers that the navigation controller manages. Unfortunately, the view I want to hide it for is not a UINavigationController. I even went so far as to *wrap* the view in a UINavigationController, but when I called initWithRootViewController, it didn't hide the bottom bar.

- animating out, setting alpha = 0, hiding the tab bar: the tab bar will disappear, but there is a blank gap where the tab bar was that won't be filled by other content on the screen.

- replacing the tab bar view with my view: I tried myTabBarController.view = someView, hoping it would replace the whole view (including the tab bar) with myView. However, it only replaced the content area, and the tabBar still showed up.

I am at the end of my wit with this. I need to get that darn tab bar off my screen when displaying myView, but I still need myView to be one of the items available on the tab bar itself. Any ideas are welcome at this point! I've searched through every iPhone Dev forum and I haven't found any advice.

Thanks,
--d
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
I have been able to use hidesBottomBarWhenPushed just fine with view controllers inside navigation controllers inside tab bar controllers. Are you using this property instead of the method call?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.