★ TouchArcade needs your help. Click here to support us on Patreon.

How to hide the UITabBar?

07-21-2009, 07:45 AM
#1
Joined: Mar 2009
Location: Singapore
Posts: 1,770
Send a message via AIM to kohjingyu
How to hide the UITabBar?

Hey guys,
Is there any way to hide the UITabBar of an application? Like when I press a button it is hidden then when I press another button it is shown.

Thanks.
07-21-2009, 10:31 AM
#2
Its a great pain in the butt. If you look at the way apple does it, they use a new view in a modal view controller. The hard way is to move it off the screen with code, which, depending on your views inside the tabbar, can cause a whole load of issues. If your pushing a view controller, you can use
<thePushedViewController>.hidesBottomBarWhenPush ed = YES before you push it onto the stack
07-22-2009, 09:07 AM
#3
Joined: Feb 2009
Location: Minneapolis, MN
Posts: 122
Can't you just [tabBar setHidden:YES] ?

There's a convenience method for NavControllers, but I don't see one for Tab controllers... ([navController setNavigationBarHidden:YES animated:YES]) ...you could always make your own, but that does seem like a pain, it's true.

My games: ActionChess, Oppo-Citrus & Catchup
blog: http://chesstris.com/ twitter: livingtech GameCenter: grid