Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Settings menu through UITableView

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!

like image 873
Jonatan Hedborg Avatar asked Jul 12 '26 04:07

Jonatan Hedborg


1 Answers

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:..]

like image 195
vaddieg Avatar answered Jul 14 '26 18:07

vaddieg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!