views:

355

answers:

4

I'm writing code that will allow my iphone-app to have a "configuration page".

A grouped, scrolling, UITableView... with cells that contain the needed textFields, switches, sliders, etc.

It is an ENOURMOUS amount of code. Is there an easier way?

Is there a way I could create a simple text-file, contain all my desired design choices and have my (reusable) code build the TableView for me?

Or... can I just do the whole thing quicker/easier in Interface Builder instead of code?

+2  A: 

If you can live with the limitations of the standard application preferences in iPhone, you can actually create this using a settings bundle which only needs a plist and optionally a localized strings file.

You can check out Apple documentations for this: http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationSettings/ApplicationSettings.html

Claus

Claus Broch
I don't mind "some limitations"... but my config-screen must reside *INSIDE* my app. (Not sure why so many people like to run/exit/config... run again/exit again/reconfigure again... in "setting based" config screens.)
Bonnie
A: 

I've built something like what you're looking for. Going off Claus's answer as well, it basically just duplicates the interface of the Settings application using the same settings.plist file as the settings app. The only difference is that it's a view controller that you can put inside the app. There's a surprisingly small amount of coding involved, it was just a lot of looking at the settings app to see exactly how things were laid out.

Ed Marty
A: 

If you're looking for a ready made and reusable solution, you can check http://www.inappsettingskit.com/

It's open source too, so it's useful as a base.

I never found an easy and efficient way to build complicated table view by using Interface Builder, so I think programming the settings view is more preferable.

If you're talking about using a text file or plist, you may want to mimic the Settings Bundle design of Settings app.

Load the plist data upon the app launch.

Jesse Armand
+1  A: 
yonel