Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-02-2008, 03:05 PM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 38
Default 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
toom is offline   Reply With Quote
Old 09-03-2008, 09:00 AM   #2 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 211
Default

Set the hide navigation controller member on the new view controller.
lapse is offline   Reply With Quote
Old 09-03-2008, 10:13 AM   #3 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 38
Default

I put this in the NewViewController.m file:

Code:
- (void)awakeFromNib {
	self.navigationController.hidesBottomBarWhenPushed = YES;
}
But it doesn't work.
toom is offline   Reply With Quote
Old 09-03-2008, 10:14 AM   #4 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 211
Default

Set it on your NewViewController object. Not the navcontroller.
lapse is offline   Reply With Quote
Old 09-03-2008, 10:44 AM   #5 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 38
Default

Sorry but I don't know what to do .
toom is offline   Reply With Quote
Old 09-03-2008, 11:16 AM   #6 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 211
Default

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.
lapse is offline   Reply With Quote
Old 09-04-2008, 08:59 AM   #7 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 38
Default

ahh thank you, i tried this before:
Code:
- (BOOL)hidesBottomBarWhenPushed{
	return TRUE;
}
but i forgot to add it to the .h file .
toom is offline   Reply With Quote
Old 11-21-2008, 12:50 AM   #8 (permalink)
Jijo Pulikkottil
 
david_david's Avatar
 
Join Date: Oct 2008
Posts: 341
Default

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];
david_david is offline   Reply With Quote
Old 10-20-2009, 04:36 PM   #9 (permalink)
iPhone20
 
Join Date: Sep 2009
Posts: 80
Default 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
apiphone is offline   Reply With Quote
Old 11-02-2009, 07:25 PM   #10 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 9
Default

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!
GabrielV. is offline   Reply With Quote
Old 02-12-2010, 10:04 AM   #11 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 2
Default 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. View Post
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!
wannamobile is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,157
Threads: 38,932
Posts: 170,812
Top Poster: smasher (2,565)
Welcome to our newest member, hydevil
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:33 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0