Skip to Main Content
Cocoa Programming for Mac OS X, Third Edition
book

Cocoa Programming for Mac OS X, Third Edition

by Aaron Hillegass
May 2008
Intermediate to advanced content levelIntermediate to advanced
464 pages
8h 13m
English
Addison-Wesley Professional
Content preview from Cocoa Programming for Mac OS X, Third Edition

Chapter 13. User Defaults

Many applications have Preferences panels that allow the user to choose a preferred appearance or behavior. The user’s choices go into the user defaults database in the user’s home directory. Note that only the choices that vary from the factory defaults are saved in the user defaults database. If you go to ~/Library/Preferences, you can see your user defaults database. The files are in property list format; you can browse through them with Property List Editor.

The NSUserDefaults class allows your application to register the factory defaults, save the user’s preferences, and read previously saved user preferences.

The color well that you dropped into the Preferences window in Chapter 12 will determine the background color ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

COCOA PROGRAMMING FOR MAC OS X SECOND EDITION

COCOA PROGRAMMING FOR MAC OS X SECOND EDITION

Aaron Hillegass

Publisher Resources

ISBN: 9780321562739Purchase book