swiftxcodemacosviewcontrolleroutlet

Cannot make an outlet of a label


I am working on an application with tab views. In one of the tabs I have several labels. I want to make an outlet foreach of the labels, but clicking control and dragging it to the ViewController file doesn't do the trick for me. I think it has something to do with the tabs but I can't figure what the exact problem is. How can I add the label to the ViewController?


Solution

  • In storyboard, you need to set the ViewController's class first, then you can connect the labels:

    enter image description here