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. ...

Get Objective-C Programmer's Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.