views:

613

answers:

4

I have an application that uses a TabBarController to switch between modes. When in a certain mode, I'd like to hide the tab bar until the steps of that mode have been completed. Note that I'm not using a navigation controller so I can't use the setHidesBottomBarWhenPushed method on the navigation controller to hide the tab bar.

When I attempt to hide the tarbar using:

self.tabBarController.tabBar.hidden = YES

the tab bar goes away, but it leaves a 50 pixel blank area at the bottom of the screen where the tab bar used to be. I can't seem to figure out how to fill that area. Anything in the UI that is in that area is clipped and cannot be seen.

Any ideas if this is even possible? I'd really like to stay away from the navigation controller...

Thanks

--Steve

A: 

Do you have the autoResizingMask set on the sub view?

view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

Something like that should do the trick and allow the view sitting atop the stack to re-size.

MystikSpiral
Just tried that. No effect. I still get a blank 50 pixel region at the bottom of the screen
Steve
A: 

Why are you not using a navigation controller. It's a lot easier to hide the nav bar than the tab bar...

Kendall Helmstetter Gelner
I've got a fairly tight deadline on the demo version of this project, and I'd rather not have to step backward to get it going. Once the demo version is out the door, and funding pouring in the door :-) I'll most likely completely rewrite the UI and use a nav controller then.
Steve
A: 

See this thread:

http://stackoverflow.com/questions/1356828/show-hide-tabbarcontroller-in-iphone

In summary, you can see an example of this behavior in this sample code:

http://developer.apple.com/iphone/library/samplecode/TheElements/index.html

esilver
Unfortunately, that requires the use of the Navigation Controller, to hide the tab bar when a new view controller is pushed. I'm not using a navigation controller, so that won't work for me.
Steve