How to create Cocoa App Preferences for Mac?
For the window itself, i would recommend the RHPreferences framework.
Available on GitHub. BSD Licensed.
Its a simple and easy Preferences window controller with multiple tabs for your next Mac application.
It also provides:
- Auto resizing between different sized tab views (With animation)
- Custom NSToolbarItem support
- Persistence of the last used tab
- Support for placeholder NSToolbarItems (eg NSToolbarFlexibleSpaceItemIdentifier & NSToolbarShowFontsItemIdentifier)
This is the documentation you want. More specifically How to provide a Preferences Interface.
Anyhow, you'll have to make your own preferences menu/window as you would make any other window, and have some controls that allow modifying values that are then stored in the User Defaults dictionary, which is where user preferences are usually stored (a process which Cocoa Bindings makes extremely easy).
Otherwise, manually, you would probably want a reference to [NSUserDefaults standardUserDefaults]
so you can -setObject:ForKey:
and so forth. It would be wise to read the entire documentation linked to above (including the other sections).
For more information on how Cocoa Bindings can be used to interface with NSUserDefaults
to store/retrieve preferences, see the Apple docs here.