How do I create a Preference Pane?
-
19-09-2019 - |
Question
How do I create a preference pane for my app on Mac. Also, how do I make a preferences section for my app in the iPhone?
Solution
Your iPhone app needs a Settings bundle if you want to have your preferences in the system preferences.
http://developer.apple.com/iphone/library/samplecode/AppPrefs/index.html
You can create your own preferences view in your app on either platform. This is done by creating a view controller or window controller like you would any other view controller/window controller and you can use NSUserDefaults to store/retrieve the information you obtain from your user.
OTHER TIPS
To put settings inside your application you might want to consider mySettings, an open source (EPL) framework for doing much of the hard work. After making a small code contribution myself I decided against including the setting inside my app after all.
For the Mac, you may wish to consult Apple's Preference Panes guide.
For Mac OS X, i would recommend my 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)