1. Multi-level key-value observing allows objects to observe changes to properties across multiple levels of nested objects.
2. To implement multi-level KVO, the model must support dynamic property access using valueForUndefinedKey to traverse nested object hierarchies.
3. Observers must add and remove observation for each nested level, and handle change notifications separately for each level.
9. Key-Value Observing
What?
• Key-value observing is a mechanism that
allows objects to be notified of changes to
specified properties of other objects.
• alternatives you should already know:
• delegate/protocol
• NSNotification
• callback using @selector or block
9
10. Key-Value Coding First
• mechanism that allows accessing object
properties indirectly by a name/key (string)
• NSKeyValueCoding protocol
• NSObject provides default implementation
(getters/setters, …)
10