I am trying to do something as simple as add a Label to a View in XCode and IB and I can\'t figure out how to do it. All the samples I find online are for older versions of
Assume that you have a viewController and a xib file which has a UILabel on this. The steps to connection the UiLabel (also the xib file) your viewController are:
1) In the header file, create UiLabel object and property for it
IBOutlet UILabel *label;
@Property (Nonatomic, retain) IBOutlet UILabel *label;
and synchthesize it in implement file
2) Open your xib file in Interface Builder
Double click on "File's Owner" then select the viewController in dropdownlist of pop-up windows to connect your xib file to controller
3) right-click on file's owner, on the pop-up dialog:
=> now the label and the view on xib file is connected to you controller