views:

506

answers:

1

I'm trying to build a nice looking config-screen using UITableView (much like the settings on the iPhone, in the clock etc).

I'm having some doubts as to how aproach this; I will need some UITableViewCells with switches in them (right now placed in the accessoryView), other that link to further pages and a detailLabel indicating the current setting (probably with CellStyleValue1).

How would I best design such a menu? Through IB? Through code? Generate all cells at init? Generate in cellForRow[...]?

Thanks!

+3  A: 

Config screen usually contain limited number of cells, so there is no need to worry about cell reusability. Design your cells in IB, bind with code like IBOutlet UITableViewCell* firstCell, secondCell... put them into array in proper order. In tableView:cellForRowAtIndexPath: just return [array objectAtIndex:..]

vaddieg
Awesome, thanks!
Jonatan Hedborg