user3281743
user3281743

Reputation: 295

Connecting IBAction to a button in xcode5

I've been following this guide carefully and I got stuck here. Click here When I try to connect press ctrl and drag on my button, a popup comes up giving me options "Leading space to container, Center Vertically in container, Equal widths, equal height Aspect ratio" I don't see the option to press my button like in the guide. I read the comments below and it seems like everyone is having this problem. I know it's an old guide so that's probably the reason why

Upvotes: 0

Views: 49

Answers (2)

DeeTee
DeeTee

Reputation: 707

Instead of control-dragging from the storyboard to the storyboard, open up the Assistant Editor with the .m/.h file you want the action code to be in, and control-drag the button from the storyboard to somewhere in that document. Then you should be able to pick between IBOutlet and IBAction.

Hope this helps!

Upvotes: 0

Rafał Sroka
Rafał Sroka

Reputation: 40038

Just right click on the button and then you can normally drag from touchUpInside action to your view controller.

enter image description here

Upvotes: 2

Related Questions