Using same interface builder action for two different button controls

I was following the Auto Layout videos Part 5, when I could not control drag from a button to an existing interface builder action which is already being used by another button. The narrator was able to do that in the video. What is the problem. Has that ability been discontinued with the current version of Xcode?

Hi @brower

It should be possible to do that. I would suggest you to drag from the “touchUpInside” event to your action in code. Here is the screengrab to help you locate that event:


Let

Nikita

Also, sometimes Xcode simply gets confused, and even though you’re dragging to a valid method in a valid file, it doesn’t recognize that the file is actually linked to the storyboard. Sometimes a simple clean of the project and restart of Xcode does wonders.