IOS5 Autolayout 引发的错误 Could not instantiate class named NSLayoutConstraint

新建工程在模拟器上能运行,在真机上运行失败,报错如下  Could not instantiate class named NSLayoutConstraint

*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'

*** First throw call stack:

(0x324df88f 0x34535259 0x324df789 0x324df7ab 0x321ed54d 0x321ed6bb 0x321ed423 0x3217e001 0x320ec3c7 0x31fc9c59 0x31f3fc17 0x31f9f63d 0x31f9f5db 0x31f9ef15 0x31fa18f5 0x31fa143b 0x31f48b95 0x31f48a49 0x31f09b05 0x31f094ab 0x31f09377 0x31f3e555 0x31f30e87 0x31fa17d5 0x31f3ee6d 0x31f387dd 0x31f06ac3 0x31f06567 0x31f05f3b 0x3158d22b 0x324b3523 0x324b34c5 0x324b2313 0x324354a5 0x3243536d 0x31f3786b 0x31f34cd5 0xe3819 0xe37b4)

terminate called throwing an exception(lldb) 

问题解决:

选中.stroyborad和.xib文件,将Interface Builder Document下的“Use Autolayout”去掉。

IOS5 Autolayout 引发的错误 Could not instantiate class named NSLayoutConstraint_第1张图片

你可能感兴趣的:(IOS5 Autolayout 引发的错误 Could not instantiate class named NSLayoutConstraint)