-
Notifications
You must be signed in to change notification settings - Fork 3
Home
A configurable table view is based on a lightweight model to configure a UITableView. Normaly you need to implement the UITableViewDatasource protocol to define the sections and cells a UITableView shows. This can get very complicated for rather simple forms with different cells. The configurable table view provides an easy and readable way to define simple and complex tables for forms, selections, settings, ...
The model is defined by putting together the following classes:
- CBTable - This is the table model
- CBSection - A table has one or more sections
- CBCell - Each section contians cells. (Predefined cell types can be found here: CBCells)
There are many different CBCell types available for different data: CBCellString, CBCellNumeric, CBCellBoolean, ... You can define your own cells very easily.
To define a configurable table view you normaly define a subclass of CBConfigurableTableViewController. This provides everything that's needed to have a configurable table view. The steps to take are:
- Create the subclass of CBConfigurableTableViewController
- Define the model by using the CBTable, CBSection and CBCell (sub)classes
- Define the data object