崩溃对iOS6的presentViewController:但不是在iOS5的
问题描述:
当我运行我的iOS6的模拟器应用程序和Xcode 4.5 GM种子这段代码崩溃:崩溃对iOS6的presentViewController:但不是在iOS5的
if ([[[UIDevice currentDevice] systemVersion] isEqualToString:@"6.0"]) {
XLog(@"hier checken");
self.tabBarController = [[UITabBarController alloc] init];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
}
[...]
self.loginController = [[[LoginController alloc] initWithNibName:@"LoginController_iPhone" bundle:nil] autorelease];
self.loginController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
//this line occurs a crash on iOS 6 (simulator, device not tested)
[self.tabBarController presentViewController:self.loginController
animated:YES
completion:nil];
的崩溃是一个SIGABRT。没有关于崩溃的更多信息。
在iOS6上发生这种崩溃的是什么?
答
initWithNibName:bundle:
是UIViewController的指定初始值设定项,在iOS6中有一些新的东西。
你可以尝试修改您的LoginController_iPhone.xib并删除其控制器:
---->
这对我的作品。 希望这有助于。
+0
我也试过用我所有的视图控制器,之后,我有新的错误,所以这个问题是固定的。那是正确的答案,谢谢! – brush51
答
我正在研究的一个应用程序,当我试图访问地址簿时会崩溃而没有任何痕迹。 ABAddressBookRef或ABAddressBook创建并允许您的应用程序访问关闭的联系人,将导致应用程序崩溃。希望这可以帮助!
你可以发布崩溃日志吗? (即使它只是SIGABRT)? –
我没有收到控制台中的任何崩溃日志。 – brush51
我唯一可以建议的是评论一切,然后取消注释一行,运行并继续循环,直到它崩溃(或者您可以通过断点逐步完成)。你会知道为什么它崩溃 –