For starters, set the tableViewStyle
property to UITableViewStyleGrouped
.
Then change the data source to provide 2D arrays with the groups you want, instead of a simple array. It's pretty simple, actually.
You will need to customize the row with UIControl
types that you want - I assume you're already doing that though.
EDIT:
To add the control to the row, create it when you create the cell.
...
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setFrame:CGRectMake(0.0f, 5.0f, 30.0f, 30.0f)];
[button setTitle:@"Click Me!" forState:UIControlStateNormal];
[button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
[cell addSubview:button];
...