Configure the Array Controller

Open Document.xib. Delete the text field that says Your document contents here. Drag an array controller onto Interface Builder’s dock. The array controller will be using the document object’s NSManagedObjectContext to fetch and store data. Use the bindings inspector to bind the array controller’s managedObjectContext to File's Owner’s managedObjectContext (Figure 13.3).

Figure 13.3  Giving the array controller a managed object context

Giving the array controller a managed object context

With the array controller still selected, switch to the attributes inspector. Under the Object Controller heading, set Mode to Entity Name. Then set the

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide 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.