Ios Apprentice 1 - problem connecting UILabel to View Controller

Good afternoon,

I’m following the ios Apprentice v5 tutorial 1, and on page 67 I tells me to connect the targetLabel to the View Controller. For some reason xcode doesn’t let me.

I already created the IBOutlet as I did for the slider but in the connections inspector, when I try to drag the Referencing Outlets to the View Controller, the View controller doesn’t get selected. Also, in the connections inspector, I don’t see the circles as in the image on the book.

Would you please help me?

Have you tried to Ctrl-Right click-drag the mouse from the selected Label in Interface Builder to the @IBOutlet declaration? You can also drop it into the code (beware putting it into class definition and not in things like functions or outside the class) and just type the name… that’s how I usually make IBOutlets, I never write them.

No I didn’t. Strange enough, after closing and opening XCode about 3 or 4 times, everything came back to normal (without making any change at all…)

If this happens again, I’ll try your suggestions.

Thank you!

Unfortunately, the more you work with Xcode, the less strange this will feel… Let’s just say it still has some bugs.

I’d suggest you to try it anyway. At least for me it’s more confortable rather than typing my own outlets and then connecting them. Maybe you do this now because you just copy book’s letters, but trust me that the other solution is the most confortable… especially when you are not sure how the declaration should be.