Home News Forum Social Networking Support Us Advertise

Spanish Lesson 1 ($1.99)

aWake!Gently ($1.99)

The Bird & The Snail - Knock Knock - Deluxe ($4.99)

Match-It Trains ($0.99)

Tangled ($0.99)

iFlatter ($0.99)

The 15 puzzle ($0.99)

Tap Forms Database ($8.99)

Higher or Lower Card Game (Hi Lo) ($0.99)

Red Pixel ($0.99)

Time-Shift Radio ($0.99)

Want your application advertised here? Only $10/week!

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)
Member
 
Join Date: Jul 2008
Posts: 38
Rep Power: 0
toom is on a distinguished road
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)
Senior Member
 
Join Date: Aug 2008
Posts: 211
Rep Power: 1
lapse is on a distinguished road
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)
Member
 
Join Date: Jul 2008
Posts: 38
Rep Power: 0
toom is on a distinguished road
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)
Senior Member
 
Join Date: Aug 2008
Posts: 211
Rep Power: 1
lapse is on a distinguished road
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)
Member
 
Join Date: Jul 2008
Posts: 38
Rep Power: 0
toom is on a distinguished road
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)
Senior Member
 
Join Date: Aug 2008
Posts: 211
Rep Power: 1
lapse is on a distinguished road
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)
Member
 
Join Date: Jul 2008
Posts: 38
Rep Power: 0
toom is on a distinguished road
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)
Senior Member
 
Join Date: Oct 2008
Posts: 181
Rep Power: 1
david_david is on a distinguished road
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
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


» Advertisements


» Stats
Members: 8,229
Threads: 20,197
Posts: 90,213
Top Poster: RickMaddy (2,121)
Welcome to our newest member, jrsiqueira
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:22 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0