O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

For the More Curious: NSUserDefaultsController

Sometimes you will want to bind to a value from the NSUserDefaults object. An NSUserDefaultsController makes this possible. All the NIBs in your application will use a single shared instance of NSUserDefaultsController.

For example, if you wanted to use bindings to deal with SpeakLine’s text field, you would bind it to the shared NSUserDefaultsController with a Controller Key of values and a Model Key Path of activeTextKey (Figure 14.3).

Figure 14.3  Binding to the NSUserDefaultsController

Binding to the NSUserDefaultsController

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required