Ok, real basic tutorial this time.

One line of code! Literally.

And the magic line of code is…

MyViewController *controller = [[[MyViewController alloc] init] autorelease];

// This is the line! 😀
controller.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:controller animated:YES];

That’s all you need :).

That’s fine and all if you’re a coder, but not all of us go tap-tap on keyboards each and every day (and especially night!), whilst sucking down on cans of cola (really bad for your teeth by the way) and chomping down on pizza as we stare like zombies at our screens.

Ah, fun times ;)…

Anyways, I’ve also put together a video tutorial that’ll show you an example Dapp exported project and the steps to find the exact spot to put our little line of code that hides our tab bar :).

Check it out.

4 thoughts on “HOW TO HIDE THE TAB BAR IN IOS”

    • self.tabBarController.tabBar.hidden = YES;

      You could put that in the init method for your view controller or you can create a – (void)viewWillAppear {} method to place it in.

      Or if you want to animate a fade out, create a – (void)viewDidAppear {} method and put the following in:

      [UIView beginAnimations:nil context:nil];
      [UIView setAnimationDelegate:nil];
      [UIView setAnimationDuration:1.0];

      [self.tabBarController.tabBar setAlpha:0.0];

      [UIView commitAnimations];

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter Captcha * Time limit exceeded. Please complete the captcha once again.