Chapter    9

Working with Object Graphs

The object graph refers to the objects in an application along with all the object’s relationships. In most applications, you will have many objects with many relationships and these can become a bit difficult to manage without some help.

Objective-C comes with some nice features that help you make the most of your object graph. The recipes in this chapter will show you how to:

  • Create an object graph
  • Use key-value coding (KVC) to dynamically access property values
  • Use key paths to access objects in a hierarchy in the object graph
  • Use the Observer pattern with key-value observing (KVO) to get notifications when property values change
  • Use inspection
  • Archive and retrieve object graphs

Object-Orientated ...

Get Objective-C Recipes: A Problem-Solution Approach 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.