iPhone Settings Manager 25-Aug-2010 2:41 PM
Edit FancyEdit New New Blog Upload All Recent Home Logout

Table Of Contents

TOP

1. The Problem

Managing settings on the iPhone is a tedious job. You can make your own "flipside" or settings page, and code it all by hand every time you want to do such a thing in an application.

Also available to developers is the use of the system-based settings application. This works well, but the user has to exit the target application to launch the system settings; hardly a nice user experience.


TOP

2. The Solution

Make a set of classes that can load the system-based settings XML documents (or something close) and generate a scrollable list view that looks like the System Settings application with little to no extra effort by the programmer.

Another advantage is that this also allows for more settings controls than were previously available. Color selectors or system-sound selectors or other compound settings packages.


TOP

3. Implementation

The main classes act as a Data Source for a UITableView. It loads in the settings.plist file you point it to, and handles everything from there. It creates the cells, populates them with the appropriate widgets, and sets their values according to the defaults defined in the file. When you display the table view, the settings are loaded in from your user defaults, and displayed to the user. When any item is changed, those values are stored back in the system defaults, and your delegate will be called to notify you of the changes. In some cases, a second callback will be called on your delegate when buttons in the interface are pressed and such.

TOP

3.1. Supported widgets

TOP

3.2. Not supported yet

TOP

3.3. No plans to support


TOP

4. Source Code

Source will be available once I finish the first version. It will be released with something like a modified MIT license, so it can easily be used in your closed-source commercial products without worry or fear.