Xcode- Reference Outlets Connection

  1. To create a connection, you have to declear a property in your code

@property (nonatomic, weak) IBOutlet UILabel *welcome;

Like here, it creates a property of a nonatomic and weak UILabel called welcome.

(Click here to read “The Use of UI Label”)

2. In your view (storyboard), put a UILabel object.


3. Right click on the object you just put on your view. Drag the dot on the right side of ‘Reference Outlets’ to your view.

4. Select the name you defined for the property. And you have successfully created a “connection” between the object on the view and the one in your code. You can now follow the guide in this article to change the Label in your view.