unrecognized selector sent to instance (iOS) [duplicate]

∥☆過路亽.° 提交于 2019-12-04 12:00:31

I met this issue and solved it just by reconnected the Button to the IBAction whose name was modified before. So embarrassing.

I think the issue is that you are sending the method gotoTone: to a Tone object, however this method is defined within the Forside object. I'm not sure exectly why this is happening, however I suggest checking the connections within you xib file.

You haven't provided any information about how your button is configured, but if the button is in your nib file, it seems likely that the identity of the button's target is set to the wrong class. So make sure that the class of the object the button sends its message to is Forside rather than Tone.

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