Question Regarding Tutorial 8

+1 Andrew Pieterson · July 12, 2015
Hello, I was following tutorial 8 and tried dragging a label while pressing control. Yes I did see the blue line, 
and when I dropped it in the assistant editor, a dialog box with the exact same options as seen in the 
tutorial popped up. Unfortunately, I was unable to see an action button. I thought my Xcode wasn't uptodate
but thats not the problem. So what is? Thanks in advance.
PS:- Great videos by the way. 

Post a Reply


Oldest  Newest  Rating
+1 Bhakti Karva · April 9, 2016
I had the same problem. This is what worked for me.

In the new Xcode versions, dragging does not work for Action events. For attaching Action events to button please use the following guidelines.

1. Create a @IBAction method in your view controller class.
2. In your storyboard view, select the button, hold down the control key and drag it to the yellow square button on the top of the view controller. 
3. After realising, a drop down will pop-up containing all the methods.
4. Select your newly created method from the drop-down.

For conformation purposes, right-click the button. A drop-down will pop-up. Under the Sent-event sections look for touch-up inside row. Your method name should be right next to it. If not, please repeat the steps above.

Hope this helps. :)
0 Awesome Deep · July 16, 2015
i'm a beginner but I think the "action" is an option for buttons (and perhaps other type of objects)...but not for labels
  • 1

iOS Development / Swift


This forum is for questions, comments, and general discussion about iOS Development and Swift.

Bucky Roberts Administrator