4

When I follow the instructions at How do I add an action or outlet to a class in Xcode 4.3.1?, or Apple's First iOS App tutorial, there's no option for Action. There is only options for Outlet and Outlet Connections. What am I doing wrong?

enter image description here

Community
  • 1
  • 1
Cin316
  • 651
  • 1
  • 9
  • 19

1 Answers1

7

You can connect actions only to subclasses of UIControl.

You are trying to create an action from a UIView, which is not a subclass of UIControl and does not have actions.

Start the drag from the button, and not the "main view"

Matthias Bauch
  • 89,811
  • 20
  • 225
  • 247
  • Thank you! Just to clarify, I have to select the object before I start the control-drag, correct? – Cin316 Mar 31 '13 at 16:16