The main layout is a grouped table. Each cluster of cells represents a section of a table. The upper part of the cell is set by a transparent background.
The key to doing this work is having a logical structure in the tableview delegate that understands which cell layout goes in that section and in which row. The switch statement is usually the easiest, although you can also use arrays or dictionaries to customize the layout.
So in tableView:cellForRowAtIndexPath: you will have something like:
switch (indexPath.section) { case 0: cell= //configure cell with transparent background break; case 1: if (indexPath.row==0) { cell = // configure cell for multiline }else { cell = // configure for UITableViewCellStyleValue2 } break; case 2: // .. and so on for each section and cell break; default: break; }
In this layout, tableview is used less as a logical table (which displays repeating units of structured list data) and a more convenient layout control mechanism. The logic for managing the table view should be more complex and reflect the needs of the layout.
Techzen
source share