What you can do is use the connections Inspector:
- select the object in Interface Builder
- open the Inspector panel on thr right (with the sqaure at the extreme top right)
- select the last icon on the right, for connections Inspector (circled arrow)
- now you can click on a small circle (like New reference outlet) and drag to the code, with no need to control-drag.
- you can connect to IBAction in the same way
Note: if you right-click on the object in IB, you will see the panel with all the connections. You can use it instead of the Connections Inspector.
Second way is to connect from code.
- create the object in Interface Builder (a Label)
- declare the var in code
@IBOutlet weak var lengthLabel: UILabel!
=> a small circle appears at its left.
- click and drag (no control drag) from this circle to the object in Interface Builder
- That creates the connection
- You see the small circle turn black.