Skip to content
chbeer edited this page Apr 23, 2011 · 3 revisions

What is a Configurable Table View?

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.

How is it used?

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:

  1. Create the subclass of CBConfigurableTableViewController
  2. Define the model by using the CBTable, CBSection and CBCell (sub)classes
  3. Define the data object
Clone this wiki locally