iOS开发问题之Could not instantiate class named NSLayoutConstraint

这个问题在ios6.0之前的版本中运行会出现,因为使用Xcode 4.5之后的版本新建项目默认是选中AutoLayout的,但这个特性是在iOS6.0之后的版本中才支持的。

解决办法是选中.stroyborad或.xib文件,将Interface Builder Document下的“Use Autolayout”去掉。

注意如果工程中有许多的.xib文件是每个都要去掉的!!

iOS开发问题之Could not instantiate class named NSLayoutConstraint

错误日志输出如下:

2013-09-07 14:56:41.568 GeneralProject_ARC[83404:c07] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'

*** First throw call stack:

(0x230d052 0x1cfdd0a 0x22b5a78 0x22b59e9 0x13d07d7 0x13d09af 0x13d06b7 0x12d136d 0x1178e2c 0x11793a9 0x11795cb 0x1178c1c 0x119f56d 0x1189d47 0x11a0441 0x11a045d 0x11a04f9 0x10e0d65 0x10e0dac 0x2fd2 0x10b19d6 0x10b28a6 0x10c1743 0x10c21f8 0x10b5aa9 0x347cfa9 0x22e11c5 0x2246022 0x224490a 0x2243db4 0x2243ccb 0x10b22a7 0x10b3a9b 0x2ce2 0x2c15)

terminate called throwing an exception

 

你可能感兴趣的:(CONSTRAINT)