Hello,
I have programmaticly added a rightBarButton item to some levels of my drill-down navigation based application, but I am not sure how/ what code I need to use to get the button to switch Views. Here is what I've done so far:
As follows: (in viewDidLoad)
UIBarButtonItem *NextButton = [[[UIBarButtonItem alloc] initWithTitle:@"Next" style:UIBarButtonItemStylePlain target:self action:@selector (Next)] autorelease];
self.navigationItem.rightBarButtonItem = NextButton;
And Specified an IBAction to switch the view and load another view:
- (IBAction)switchview

id)sender
{
BottegonViewController *Bottegon = [[BottegonViewController alloc] initWithNibName:nil bundle:nil];
Bottegon.modalTransitionStyle= UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:Bottegon animated:YES];
}
Can anyone tell me how to relate the button to switching the view so that when the button is pressed it will load the next view?