Search code examples
objective-ciphoneuitabbarcontroller

Hide the tab bar in a tab bar application


I have created a new project from the template:

IPhoneOS>Application>Tab Bar Application.

I get two tabs.

How can I make the second become a full screen hiding the tab bar and even the status bar?

I tried to check the "Wants Full screen" - but it didn't help.

(Much less important... When I do get a full screen I do I get back?)

Please give me a simple code/guidelines or a reference to them, cause I'm a beginner - and Me and the compiler got too many issues to make things worse

Thanks Asaf


Solution

  • To hide the tab bar you can use hidesBottomBarWhenPushed. For instance:

    MyController *myController = [[MyController alloc]init]; 
    myController.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:myController animated:YES];
    [myController release];
    

    To hide the status bar you can use:

    [[UIApplication sharedApplication] setStatusBarHidden:YES];
    

    To hide the nav bar you can use:

    self.navigationController.navigationBarHidden = YES;