Outlets
Nine of the 14 labels in the billboard view display names, dates, and statistics that are taken from the Passer Rating data store. There has to be a way to get them from the model onto the screen. In the Model-View-Controller design model, that’s the job of a controller—in this case PRGameListController
. The question then becomes, how does the view controller get to the labels?
When an Interface Builder product is loaded into a running program, an object in the program is designated as the owner—in this case it will be a PRGameListController
. The file carries in it a list that pairs objects (your choice) to outlets in the owner. In modern practice, the outlets take the form of declared properties. The @interface
flags the outlets it ...
Get Xcode 5 Start to Finish: iOS and OS X Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.