December 2013
Intermediate to advanced
132 pages
1h 58m
English
CHAPTER 22
![]()
Key-Value Observation
Key-Value Observation Defined
One of the applications of key-value coding is implementing the observer pattern. The observer pattern is used when you want an object to get a notification when the state of another object changes. This pattern is implemented with key-value observation in Objective-C.
To see a clear example of key-value observation, you need at least two objects. One object will be observed while the other object will be observing. For this example, let’s assume that you have two types of objects: a Project object and a Task object. Project objects maintain a list of Task objects. The project object ...
Read now
Unlock full access