这是我遇到的一个奇怪的崩溃.当我按下一个转到某个ViewController的按钮时发生崩溃.它崩溃的线是:
DestinationInformationViewController *info = [[DestinationInformationViewController alloc] init];
[info setModalTransitionStyle: UIModalTransitionStyleCrossDissolve];
[self presentViewController:info animated:YES completion: nil]; // CRASHES HERE
[info release];
Run Code Online (Sandbox Code Playgroud)
崩溃跟踪是:
*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x3758288f 0x35287259 0x37582789 0x375827ab 0x3153d54d 0x3153d6bb 0x3153d423 0x314ce001 0x3143c3c7 0x31319c59 0x3128fc17 0x3129a267 0x3129a1d5 0x3133959b 0x31338367 0x84091 0x374dc3fd 0x31271e07 0x31271dc3 0x31271da1 0x31271b11 0x31272449 0x3127092b 0x31270319 0x31256695 0x31255f3b 0x33c9822b 0x37556523 0x375564c5 0x37555313 0x374d84a5 0x374d836d 0x33c97439 0x31284cd5 0x82bb3 0x71200)
terminate called throwing …
可能重复:
presentViewController:在iOS上崩溃<6(AutoLayout)
如何在iOS 6中使用NSLayoutConstraint?
应用无法加载
我刚刚开始研究iOS6 SDK中的应用程序,它在iOS 6设备和iOS 6模拟器上运行顺畅,但它不能在iOS 5或iOS 5模拟器上运行.我已将部署目标设置为:5.0
这是它试图打开时给我的错误,但它失败了......
2013-01-02 14:22:57.075 MyApp[34956:c07] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x14a5052 0xea5d0a 0x144da78 0x144d9e9 0x3327d7 0x3329af 0x3326b7 0x23336d 0xdae2c 0xdb3a9 0xdb5cb 0x3ba73 0x3bce2 0x3bea8 0x42d9a 0x2845 0x139d6 0x148a6 0x23743 0x241f8 0x17aa9 0x138ffa9 0x14791c5 0x13de022 0x13dc90a 0x13dbdb4 0x13dbccb 0x142a7 0x15a9b 0x257d 0x24a5)
terminate called throwing an exception(lldb)
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?