【发布时间】:2011-12-16 17:35:08
【问题描述】:
我有一个错误导致我的应用在 iOS5 下仅在 iPad 上崩溃。
当用户点击 uibarbutton 项目中的项目时,将调用以下代码:
- (void)optionSelected:(NSString *)option {
[self.optionPickerPopover dismissPopoverAnimated:YES];
if ([option compare:@"Map View"] == NSOrderedSame) {
NSLog(@"Map View");
MapView * map = [[MapView alloc] initWithNibName:@"MapView" bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:map];
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Done"
style:UIBarButtonItemStyleDone target:self action:@selector(removeCurrent)];
map.navigationItem.rightBarButtonItem = rightButton;
[self presentModalViewController:navigationController animated:YES];
[navigationController release];
[map release];
[rightButton release];
[split presentModalViewController:map animated:YES];
}
谁能说明为什么会在 iOS5 中发生这种情况?
【问题讨论】:
标签: iphone xcode ipad sdk ios5