I was writing code that created a button and did some processing when pressed. The build was working, but as soon as I pressed the button, it didn't do that and I got a unrecognized selector sent to instance
error. I had a hard time solving this, so I'll leave a note.
It was a different cause from this one. https://qiita.com/yoshiki-0428/items/80ea88f65f5a62ffcc11
Look at the yellow triangle (danger mark) on the right side of the screen. Two @IBActions are linked to one button. This is the cause.
I was having trouble releasing this link. The reason is that even if you delete the code, it will not be released until you delete the link with the yellow mark.
(Supplement) I referred to this article for how to check the association. https://teratail.com/questions/46087
I wrote it because there are few articles on swift that I killed for the first time. I wrote it with warm eyes because I was afraid that I would be told "Don't write Kita because of this!" .. ..
Recommended Posts