 |
 |
|
 |
09-02-2008, 03:05 PM
|
#1 (permalink)
|
|
New Member
Join Date: Jul 2008
Posts: 38
|
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)
|
|
New Member
Join Date: Aug 2008
Posts: 211
|
Set the hide navigation controller member on the new view controller.
|
|
|
09-03-2008, 10:13 AM
|
#3 (permalink)
|
|
New Member
Join Date: Jul 2008
Posts: 38
|
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)
|
|
New Member
Join Date: Aug 2008
Posts: 211
|
Set it on your NewViewController object. Not the navcontroller.
|
|
|
09-03-2008, 10:44 AM
|
#5 (permalink)
|
|
New Member
Join Date: Jul 2008
Posts: 38
|
Sorry but I don't know what to do  .
|
|
|
09-03-2008, 11:16 AM
|
#6 (permalink)
|
|
New Member
Join Date: Aug 2008
Posts: 211
|
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)
|
|
New Member
Join Date: Jul 2008
Posts: 38
|
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)
|
|
Jijo Pulikkottil
Join Date: Oct 2008
Posts: 341
|
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];
|
|
|
10-20-2009, 04:36 PM
|
#9 (permalink)
|
|
iPhone20
Join Date: Sep 2009
Posts: 80
|
Hide Tabbar
Hi,
Is there a way i can hide Tabbar controller on first 3 views and show it on the 4 view.
I am using navigation controller and it is a window based project.
I don't want Tabbar controller at all on first three view.
Thanks
|
|
|
11-02-2009, 07:25 PM
|
#10 (permalink)
|
|
Registered Member
Join Date: Apr 2009
Posts: 9
|
Hi,
I'm having a similar issue.
I have a UITabBarController which is declared in the app delegate, and added to the window as a subview. Each tab in the tab bar controller has a view with a navigation controller and a table view. When I drill down to the last view on the stack (which is just a view, not a table view) I want to hide to tab bar so that I get a nice full screen.
I've tried setting the "hidesBottomBarWhenPushed" property to "YES" in the TableViewController Class, just before I push the detail view onto the stack like so:
detailController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:detailController animated:YES];
Unfortunately it doesn't do the trick. I'm guessing it might be because the tab bar controller is declared in the appdelegate or something of the sort.
Please help!
|
|
|
02-12-2010, 10:04 AM
|
#11 (permalink)
|
|
Registered Member
Join Date: Feb 2010
Posts: 2
|
hide tab bar solution
Try to hide it before and after the detail view get called.
That means you have to hidesBottomBarWhenPushed at the ViewDidLoad and ViewWillAppear methods.
Hope this helps, if you still have the issue.
Quote:
Originally Posted by GabrielV.
Hi,
I'm having a similar issue.
I have a UITabBarController which is declared in the app delegate, and added to the window as a subview. Each tab in the tab bar controller has a view with a navigation controller and a table view. When I drill down to the last view on the stack (which is just a view, not a table view) I want to hide to tab bar so that I get a nice full screen.
I've tried setting the "hidesBottomBarWhenPushed" property to "YES" in the TableViewController Class, just before I push the detail view onto the stack like so:
detailController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:detailController animated:YES];
Unfortunately it doesn't do the trick. I'm guessing it might be because the tab bar controller is declared in the appdelegate or something of the sort.
Please help!
|
|
|
|
 |
| 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: 656 |
| 29 members and 627 guests |
| AlexTheMighty, andrewcan, dre, Ed99, hydevil, iSdkDev, kwanwoolee, leochanxp, MarkC, mlfarrell, muzammil, nbajjuri, Ostricho0o0o, PlayFull, preethaAjayan, rarindeed, RedM, refreshe, rishi, rkp01_jec, rocotilos, sharhelia, sindhutiwari, skorulis, southfreo, stolidimran, sumanth, zhz |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 24,157
Threads: 38,932
Posts: 170,812
Top Poster: smasher (2,565)
|
| Welcome to our newest member, hydevil |
|