I use Xcode 7.2
I can use Control+drag to swift file to create a @IBOutlet
But I can't drag @IBOutlet in swift file to storyboard. Here I don't use any other key, just drag.
Actually when I moving mouse to the spot before @IBOutlet, nothing happened and when I trying to drag it a breakpoint added.
1.I`m sure I use the right Class name
2.My project is not in a strange path or name
Try selecting your view in the storyboard and clicking on the identity inspector on the right side in class. Enter your view controller name and then drag and drop the item from the storyboard to the view controller. Hope it helps. Save this answer.
drag a "custom view" view from the object library to your storyboard scene. CTRL-drag from the view to the viewController. You should get presented with a list of suitable items to connect to. Your IBOutlet should be in the list.
don't use Control, only drag with mouse from circle icons.You can see in the picture below. Circle icons in red box
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With