NSLayoutConstraint使ViewController崩溃 [英] NSLayoutConstraint crashes ViewController

查看:95
本文介绍了NSLayoutConstraint使ViewController崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
presentViewController:在iOS 6(AutoLayout)上崩溃

Possible Duplicate:
presentViewController: crash on iOS 6 (AutoLayout)

在我的应用程序中单击一个按钮时出现此错误:

I'm getting this error when clicking on a button in my app:

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

此代码行出现错误:

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

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

The error appears only on my iPhone but not on the simulator...

推荐答案

在不支持新NSLayoutConstraint类.

这篇关于NSLayoutConstraint使ViewController崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆