Search code examples
iphoneuiimageviewuitabbarcontrollertouch

How to Hide Tab Bar Controller?


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


Solution

  • 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.