开发者

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 UITableVie开发者_如何学GowCells 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!


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜