xcode 加载不了view 报错 NSUnknownKeyException

< ![CDATA[

2013-02-25 23:40:56.913 testwebimg[2463:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<testViewController 0x7657be0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key getcolor.'
*** First throw call stack:
(0x1c91012 0x10cee7e 0x1d19fb1 0xb7ae41 0xafc5f8 0xafc0e7 0xb26b58 0x230019 0x10e2663 0x1c8c45a 0x22eb1c 0xf37e7 0xf3dc8 0xf3ff8 0xf4232 0x433d5 0x4376f 0x43905 0x4c917 0x1096c 0x1194b 0x22cb5 0x23beb 0x15698 0x1becdf9 0x1becad0 0x1c06bf5 0x1c06962 0x1c37bb6 0x1c36f44 0x1c36e1b 0x1117a 0x12ffc 0x264d 0x2575)
libc++abi.dylib: terminate called throwing an exception

 

原因是xib控件链接可能删除,没删除完导致。

解决办法:

删除所有控件xib和h文件的链接。控件右键 --链接删除。全部删除后

 

然后,到h文件。点击以前存在的。以前是实心点,删除后变成空心点,然后点着点拖到控件上,再设置一次。

 

 

]]>

你可能感兴趣的:(exception)