Hi, I've got the following code in my app to display a modal view:
InfoTableViewController *infoTableViewController = [[[InfoTableViewController alloc] initWithNibName:nil bundle:nil] autorelease];
infoTableViewController.title = @"Pirateometer";
infoTableViewController.navigationItem.rightBarButtonItem =
[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self action:@selector(dismissInfo)] autorelease];
navController = [[UINavigationController alloc] initWithRootViewController:infoTableViewController];
[self presentModalViewController:navController animated:YES];
[navController retain];
However when I run, instead of the Done button on the right of my navigation bar I have an Edit button. If I change .rightBarButton to .leftBarButton my Done button appears on the left as expected, but the Edit button is again there on the right.
Am I supposed to specially remove this unwanted Edit button in code, or am I doing something wrong that is making it appear in the first place? If I have to remove it, how do I go about doing so?