 |
 |
|
 |
09-02-2008, 03:05 PM
|
#1 (permalink)
|
|
Member
Join Date: Jul 2008
Posts: 38
Rep Power: 0
|
Hide tabBar
Hi,
I have an tabBar app, one tab consists of an navigation controller. When I push a view the tabBar should be hidden, just like in the ipod app. I tried this, but it doesn't work:
Code:
- (IBAction)MyBtnPressed {
[[self navigationController] setHidesBottomBarWhenPushed:YES];
[[self navigationController] pushViewController:[[NewViewController alloc] initWithNibName:@"NewViewController" bundle:nil] animated:YES];
}
Please help,
toom
|
|
|
09-03-2008, 09:00 AM
|
#2 (permalink)
|
|
Senior Member
Join Date: Aug 2008
Posts: 211
Rep Power: 1
|
Set the hide navigation controller member on the new view controller.
|
|
|
09-03-2008, 10:13 AM
|
#3 (permalink)
|
|
Member
Join Date: Jul 2008
Posts: 38
Rep Power: 0
|
I put this in the NewViewController.m file:
Code:
- (void)awakeFromNib {
self.navigationController.hidesBottomBarWhenPushed = YES;
}
But it doesn't work.
|
|
|
09-03-2008, 10:14 AM
|
#4 (permalink)
|
|
Senior Member
Join Date: Aug 2008
Posts: 211
Rep Power: 1
|
Set it on your NewViewController object. Not the navcontroller.
|
|
|
09-03-2008, 10:44 AM
|
#5 (permalink)
|
|
Member
Join Date: Jul 2008
Posts: 38
Rep Power: 0
|
Sorry but I don't know what to do  .
|
|
|
09-03-2008, 11:16 AM
|
#6 (permalink)
|
|
Senior Member
Join Date: Aug 2008
Posts: 211
Rep Power: 1
|
Sure you do.
Your NewViewController is a UIViewController, correct? There's a hidesBottomBarWhenPushed property. Set it and let the navcontroller handle the rest for you.
|
|
|
09-04-2008, 08:59 AM
|
#7 (permalink)
|
|
Member
Join Date: Jul 2008
Posts: 38
Rep Power: 0
|
ahh thank you, i tried this before:
Code:
- (BOOL)hidesBottomBarWhenPushed{
return TRUE;
}
but i forgot to add it to the .h file  .
|
|
|
11-21-2008, 12:50 AM
|
#8 (permalink)
|
|
Senior Member
Join Date: Oct 2008
Posts: 181
Rep Power: 1
|
that method worked for me with out adding it in the .h file.
But I am using this way to hide
Code:
//Load the view
AddViewController *aController = [[AddViewController alloc] init];
//Set the view title
aController.title = @"Add View";
//hide tabbar
aController.hidesBottomBarWhenPushed = YES;
//add it to stack.
[[self navigationController] pushViewController:aController animated:YES];
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
|
» Online Users: 261 |
| 25 members and 236 guests |
| amoll, bensj, BostonMerlin, crossfire, dapis, DGuy, Dracor, Groucho, heinrich, idigit, Jeremy1026, Jume, kaleman, lastiko, lildragon, mattjgalloway, mnemonic_fx, odysseus31173, Oliver Drobnik, Opticfibre, shabzcohelp, Sicga, tonylmiller, utopiaplan, wolkje |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 8,229
Threads: 20,197
Posts: 90,213
Top Poster: RickMaddy (2,121)
|
| Welcome to our newest member, jrsiqueira |
|