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
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.