Chapter 9
Key-Value Coding
In previous chapters you saw several ways in which Objective-C programmers can use OOP concepts to work with code. For example, developers can enjoy the dynamic nature of the language to implement polymorphic functionality through message passing, and even add new methods to existing classes employing the concept of protocols.
Another aspect of OOP, however, regards the access to data contained in objects. Although it is wise to avoid direct access to data managed by an object, Objective-C provides a well-defined process for getting and setting data using the property mechanism. Properties make data available to other objects, while at the same time retaining the ability to control how this data will be shared. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access