這是我遇到的怪異崩潰。當我按下轉到某個ViewController的按鈕時,發生崩潰。它崩潰的行是:DestinationInformationViewController *info = [[DestinationInformationViewController alloc] init];[info setModalTransitionStyle: UIModalTransitionStyleCrossDissolve];[self presentViewController:info animated:YES completion: nil]; // CRASHES HERE[info release];崩潰跟蹤為:*** 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 an exception(gdb) Could not instantiate class named NSLayoutConstraint注意:這會在我的iPhone 4 iOS 5.1上崩潰,但不會在我的iPhone 4S iOS 6 Beta 2上崩潰
3 回答

HUWWW
TA貢獻1874條經驗 獲得超12個贊
下載新的XCode更新和IOS6 SDK時遇到相同的問題。這是我解決的方法:
選擇發生錯誤的“界面”構建器文件(無論是xib還是情節提要文件)。在XCode右側的助手編輯器中,從左側選擇第一個選項卡,然后有一個復選框“ Use Autolayout”,如上面的屏幕截圖所示。取消選中該復選框。
- 3 回答
- 0 關注
- 723 瀏覽
添加回答
舉報
0/150
提交
取消