How to Hide Tab Bar Controller?

Gaurav Patel picture Gaurav Patel · Sep 19, 2011 · Viewed 40.4k times · Source

How to Hide Tab Bar Controller ? I want to hide the Tab Bar controller with double tap on UIImageView.

Answer

DShah picture DShah · Sep 19, 2011

Try this code:

[self.tabBarController.tabBar setHidden:YES];

where tabbarcontroller is needed to be defined...

EDIT

AppDelegateFileName *appDelegate = (AppDelegateFileName *) [[UIApplication sharedApplication] delegate];
[appDelegate.tabbarController.tabBar setHidden:YES];

before doing this make sure that you create a @property declaration of tabbarController in appDelegate .h file.