App terminating due to uncaught exception NSUnknownKey Exception , key value not coding compliant [duplicate]

好久不见. 提交于 2019-12-02 06:51:57

Xcode cannot find the value for the key theNutton in the class FieldButtonFun.

It's hard to say what's wrong without see the actual code. But in most cases, there could be a bad connection in the XIB file. Please check the XIB, ctrl-click the File's Owner, see if there is any yellow warning.

Click on your .xib then you will see the files'Owner on top right click on it and check you have any connection in yellow if you have then please click on cross button(X) and from xib right click and drag connection to filer'owner from your uibutton to make action(method)connection.

Then right click and drag from filer'owner to IBOutlet(the uiobject you declare as IBOutlet in your interface).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!