本文介绍了IBAction按钮“无法识别的选择器发送到实例”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了一些时间在谷歌上搜索这个问题的答案,并设法偶然发现答案,并认为我会分享它。

I spent a while searching for the answer for this question on google and managed to stumble across the answer myself and thought I would share it.

我收到无法识别的选择器发送到实例错误。我跟踪它到我的按钮。

I was getting the "Unrecognized Selector Sent to Instance" Error. I traced it to my button.

我在实现时所做的就是为按钮分配了两种方法。我创建了一个方法并将其链接到按钮。然后我删除了该方法制作另一个并将其链接到按钮。我没有意识到该按钮仍然链接,并希望运行不再存在的旧方法。

What I had done with out realising is assigned two methods to a button. I had made a method and linked it to the button. I then deleted that method made another one and linked it to the button. I didnt realise that the button was still linked and looking to run the old method that was no longer there.

推荐答案

只需转到你的xib,选择按钮然后在 connectionInspector (cmd +选项+ 6)删除以前的连接。

Just go to you xib, select button and then in connectionInspector (cmd + option + 6) delete your previous connection.

这篇关于IBAction按钮“无法识别的选择器发送到实例”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 12:41