8
UITableView and UITableViewController

Many iOS applications show the user a list of items and allow the user to select, delete, or reorder items on the list. Whether an application displays a list of people in the user’s address book or a list of bestselling items on the App Store, it is a UITableView doing the work.

A UITableView displays a single column of data with a variable number of rows. Figure 8.1 shows some examples of UITableView.

Figure 8.1  Examples of UITableView

Examples of UITableView

Beginning the Homepwner Application

In this chapter, you are going to start an application called Homepwner that keeps an inventory of all your possessions. In the case of a fire or other catastrophe, you will have a record for your insurance company. (Homepwner, by the way, is not a typo. If you need a definition for the word pwn, please visit www.urbandictionary.com.)

So far, your iOS projects have been small, but Homepwner will grow into a realistically complex application over the course of nine chapters. By the end of this chapter, Homepwner will present a list of BNRItem objects in a UITableView, as shown in Figure 8.2.

Figure 8.2  Homepwner: phase 1

Homepwner: phase 1

Create a new iOS Empty Application project and configure it as shown in Figure 8.3.

Figure 8.3  Configuring Homepwner

Configuring Homepwner
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset