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