User Tools

Site Tools


ios-labs-s14:intermediate-cells

This is an old revision of the document!


Custom Cells

Any object can be subclassed to customize its behavior. UITableViewCells can be subclassed and changed just like UIViewControllers.

IMG

To subclass a UITableViewCell:

  1. Create a new class, subclass UITableViewCell
  2. Set the class in InterfaceBuilder by selecting a cell in a table and changing its class
  3. Setup the cell by dragging and dropping views onto it
  4. Connect the views to the cell as IBOutlets using assistant editor
  5. Import the class into the table's delegate and change references in cellForRowAtIndexPath from UITableViewCell to the name of your new subclass
ios-labs-s14/intermediate-cells.1393212702.txt.gz · Last modified: 2014/02/23 21:31 by mbarboi