1

我正在创建一个带有故事板和 ARC 的 iOS 6 应用程序。然而我收到了这个运行时异常:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x71b4c00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key switchButton.'
*** First throw call stack:
(0x1c8e012 0x10cbe7e 0x1d16fb1 0xb78711 0xaf9ec8 0xaf99b7 0xb24428 0x2300cc 0x10df663 0x1c8945a 0x22ebcf 0xf3e37 0xf4418 0xf4648 0xf4882 0x43a25 0x43dbf 0x43f55 0x4cf67 0x10fcc 0x11fab 0x23315 0x2424b 0x15cf8 0x1be9df9 0x1be9ad0 0x1c03bf5 0x1c03962 0x1c34bb6 0x1c33f44 0x1c33e1b 0x117da 0x1365c 0x25dd 0x2505)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

在出现“switchButton”之前,但我已将其从 GUI 中删除,但它仍指向它。我也对项目进行了清理。

4

1 回答 1

0

已通过从 Outlets 面板中移除 switchButton 来修复。

于 2013-01-22T03:59:38.933 回答