首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NSLayoutConstraint崩溃ViewController

NSLayoutConstraint崩溃ViewController
EN

Stack Overflow用户
提问于 2012-06-28 20:05:37
回答 1查看 32.4K关注 0票数 105

可能重复: presentViewController: crash on iOS 6 (AutoLayout)

当我点击我的应用程序中的一个按钮时,我得到了这个错误:

代码语言:javascript
复制
2012-06-28 21:43:36.860 AppName[2403:707] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x3568788f 0x37a2e259 0x35687789 0x356877ab 0x333a254d 0x333a26bb 0x333a2423 0x33333001 0x332a13c7 0x3317ec59 0x330f4c17 0x330ff267 0x330ff1d5 0x3319e59b 0x3319d367 0x331f86a7 0x8fb11 0x355e13fd 0x330d6e07 0x3319c5e7 0x355e13fd 0x330d6e07 0x330d6dc3 0x330d6da1 0x330d6b11 0x330d7449 0x330d592b 0x330d5319 0x330bb695 0x330baf3b 0x3727a22b 0x3565b523 0x3565b4c5 0x3565a313 0x355dd4a5 0x355dd36d 0x37279439 0x330e9cd5 0x8f6cb 0x8f628)
terminate called throwing an exception

此错误在这一行代码上抱怨:

代码语言:javascript
复制
-(IBAction) goToAbout {
    About *screen = [[ About alloc] initWithNibName:@"About" bundle:nil];
    screen.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
    [self presentModalViewController:screen animated:YES];
}

错误只出现在我的iPhone上,而不在模拟器上.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-06-28 20:10:27

在尝试在不支持新NSLayoutConstraint类的设备上运行此程序之前,必须取消选中NIB中的“使用自动布局”框。

票数 263
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11252057

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档