Advertisement
  1. Code
  2. iOS SDK
Code

iPhone SDK: Working with the UITableView Class - Part 2

by
Difficulty:BeginnerLength:ShortLanguages:

Welcome to the second part of our series on using the UITableView class! In this tutorial, we will cover how to add details to a UITableViewCell class, more UITableViewDelegate methods, and lazy loading of table view rows. We will also customize the appearance of the table view using cell.textLabel.text, cell.imageView.image, cell.accessoryType, cell.detailTextLabel.text, and custom section header/footer text. These enhancements will make our UITableView class more aesthetically appealing while still sticking to the iPhone Human Interface Guidelines required by Apple.

Table Cell Display Properties:

  • cell.textLabel.text: This property controls the main text label displayed in each table cell.
  • cell.imageView.image: This property will set a custom UIImage to the left of the textLabel.
  • cell.accessoryType: This property will set a default disclosure icon, such as a checkmark or blue arrow, to the right of the textLabel.
  • cell.detailTextLabel.text This property will set a second row of slightly smaller text underneath the textLabel.
Advertisement
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.