0

好的,我在这里遇到了一个重大错误。我认为当我使用助手编辑器将动作从我的 captureButton 链接到 captureButtonPressed 时,问题就出现了。但是我不小心选择了将其链接为 Outlet,然后我删除了 Outlet 并使用 Action 再次进行了操作。

这是错误:

2014-12-09 16:29:17.611 Penny[2593:60b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Penny.ViewController 0x156511600> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key captureButtonPressed.'
asdf

它是否可能仍在查看旧链接?有没有可以查看所有链接的地方?我注释掉我的 catureButtonPressed 操作并且错误仍然存​​在。

谢谢

4

1 回答 1

2

This exception usually means that you have an outlet in your storyboard that doesn't exist in your code, so that probably is the problem. You deleted the outlet from your code, causing the key-value coding mechanisms that hook up outlets to fail. You can delete the outlet from your XIB by selecting your captureButton, opening the Connections inspector in Interface Builder, and deleting the outlet from the Referencing Outlets section.

于 2014-12-09T23:45:46.843 回答