我正在使用 Storyboard 和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中删除,但它仍指向它。我也进行了项目的清洁。

最佳答案

已通过从“插座”面板中删除switchButton进行修复。

07-24 14:20