0
我有下面的代码在我的应用程序显示一个模式的看法:我的导航栏中不需要的编辑按钮?
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];
然而,当我运行,而不是在我的导航栏右侧完成按钮我有一个编辑按钮。如果我将.rightBarButton更改为.leftBarButton,我的完成按钮出现在左侧,但编辑按钮再次出现在右侧。
我是否应该特意在代码中删除这个不需要的编辑按钮,还是我在做错误的事情,使它出现在第一个地方?如果我必须删除它,我该如何去做?
啊,那就是问题了。我不敢相信我没有看到!非常感谢。 – 2009-07-12 03:49:26