Need help with creating complex UITableView items (like the Settings app).

Posted by Craig on Stack Overflow See other posts from Stack Overflow or by Craig
Published on 2009-07-29T20:44:07Z Indexed on 2010/03/11 18:54 UTC
Read the original article Hit count: 447

I hoping to create a custom Settings view, similar to the Settings application, but with more control over the UI and access to some settings (i need to lock some of the settings).

Obvously, there are a variety of UI elements mixed in each row of application's UITableView. For example, the 'Airplane Mode' setting shows a UISwitch, while the 'Wi-Fi' setting has a text value adjacent to the disclosure symbol ('>'). Further complicating matters, is the grouping of these settings.

I have some general questions about the approach I should take:

  • Seems like i need to save the name of the setting, its current value, its grouping, and the type of UI element(s) needed to modify its value. i would like to make use [NSUserDefault standardUserDefaults], but not have these settings appear in the Settings application. I'm guessing that I will need to create my own settings-persistence class.

  • is it better to build each one of these complex UI-element combinations in code or to create a series of custom views based on the UITableViewCell and load the appropriate one? i'm guessing the latter.

  • some of the setting require that i load another view to select its value. assuming that the application is based on the Utility pattern, should the SettingsView manage the navigation stack, rather than having the app delegate do so?

Thanks for your time and comments.

Craig Buchanan

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about application-settings