RoundOutTooSoon
RoundOutTooSoon

Reputation: 9891

How to SHOW bottombar (tab bar controller)?

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

Upvotes: 1

Views: 3852

Answers (4)

sonoluminescence
sonoluminescence

Reputation: 1012

A really simple way:

 Class *instanceName = [[Class alloc] init];
 instanceName.hidesBottomBarWhenPushed = YES;
 ...
 [navigationController pushViewController:instanceName animated:YES];

Upvotes: 0

Christian Loncle
Christian Loncle

Reputation: 1584

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.

Upvotes: 0

John Smith
John Smith

Reputation: 12797

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

Upvotes: 1

cutsoy
cutsoy

Reputation: 10251

Thats very simple, just use this:

[tabBar setHidesBottomBarWhenPushed:FALSE];

Upvotes: 0

Related Questions