views:

917

answers:

3

I used this to hide the bottom bar

-(BOOL) hidesBottomBarWhenPushed{
    return YES;
}

Now i'm at a point where I want to NOT to hide it anymore. What method should I use?

Thanks

A: 

Thats very simple, just use this:

[tabBar setHidesBottomBarWhenPushed:FALSE];
Tim van Elsloo
Don't use FALSE, use NO.
zekel
+1  A: 

Take at look at Elements sample project. They do something like you want, especially in the ElementViewController.m file.

John Smith
Thanks you, monsieur. It works. The trick is to NOT set the hidesbottombar... = YES in the parent view before push. It works as to hide to bar, but there is no way to get it shown. In stead, in the init func of the child view controller, set self.sethidesbottombar... = YES;again, merci, monsieur.
SimpleCode
A: 

It took me some time putting the puzzle of John together. So here is my final result. In the .m file of my view controller I add this code:

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
    // Custom initialization
    self.hidesBottomBarWhenPushed = YES;
}
return self;}

Because I use a nib file I had to override the initWithNibName method.

Chrizzz