【发布时间】:2012-07-02 06:00:20
【问题描述】:
这是我的代码。我想在打开的 rootviewController 上放一个后退按钮。
- (void)selectSurah:(id)sender {
SurahTableViewController * surahTableViewController = [[SurahTableViewController alloc] initWithNibName:@"SurahTableViewController" bundle:nil];
surahTableViewController.navigationItem.title=@"Surah";
surahTableViewController.navigationItem.backBarButtonItem.title=@"Back";
UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:surahTableViewController];
[self presentModalViewController:aNavigationController animated:YES];
}
【问题讨论】:
-
答案显而易见。返回调用 presentModalViewController 的位置。请参阅下面的@Flex_Addicted 答案。
标签: iphone ios xcode uinavigationcontroller uibarbuttonitem