Xcode 6 cannot drag ImageView to create collection

I am using Xcode 6 and so far I have had nothing but problems. My last problem, however, really puzzled me. I am creating a Tic Tac Toe game and I am using 9 objects to view images. I am trying to drag ctrl from objects to my swift file in the editor assistant, but when I try to drag nothing happens. Usually this blue line will show up right where your socket is created when you release the mouse, but literally nothing happens no matter where in the file I drag it.

Any ideas? Thanks to


source to share

1 answer

Try this step by step.

0 / Check your storyboard id inspector that UIViewController

/ UITableViewCell

/ etc containing yours UIImageView

has the correct class name.

1 / Add the following code to your class:

@IBOutlet var imageViewCollection: [AnyObject]!


2 / In your class, drag your imageViewCollection

socket to UIImageView

s. Or from the Connection Inspector , drag your imageViewCollection

socket into UIImageView

(see picture below).

enter image description here

3 / In your class, replace AnyObject

with UIImageView

so that your declaration imageViewCollection

looks like this:

@IBOutlet var imageViewCollection: [UIImageView]!




All Articles