Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 08-10-2010, 10:05 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 10
Thallius is on a distinguished road
Default Changing Navigator Buttons depending on displayed views ?

Hi,

i am new in iOs programming and I've got a small problem at the moment.

I have a Tabbar application. In one Tabbar i have a NavBar and this is connected to a TableView. Everything works fine. Now I've added an "Add" Button in the Navbar and connected it to my TableViewController. When i click on the "Add" Button my function

Code:
-(IBAction)addFlight:(id)sender
{
	if(self.addFlightViewController==nil)
	{
		AddFlightViewController *aFlightView=[[AddFlightViewController alloc] initWithNibName:@"AddFlightView" bundle:(NSBundle *)nil];
		self.addFlightViewController=aFlightView;
		[aFlightView release];
	}
	addFlightViewController.title=[NSString stringWithFormat:@"test"];
	
	rcFlightBookAppDelegate *delegate=[[UIApplication sharedApplication] delegate];
	[delegate.flightNavController pushViewController:addFlightViewController animated:YES];
	return;
}
is called and the new view appears. Also the "Back" Button in the Navbar is avaible and works. But i need a "Done" button also, which should be in the right corner of the Navbar.

And here is my problem. I dont know how to add this button ? I think i cant do this in the interface builder, since the button is only visible as long as i am in the AddFlight view? So i must do it programaticly ? If so, what ist the right way ?

Thanks in advance

Claus
Thallius 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
» Online Users: 347
9 members and 338 guests
bignoggins, Chickenrig, firecall, iNet, linkmx, michaelhansen, Objective Zero, PlutoPrime, stanny
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,893
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:37 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0