Advertisement

iPhone SDK: Working with the UITableView Class - Part 1

by
Student iconAre you a student? Get a yearly Tuts+ subscription for $45 →

Welcome to the first in a two-part series on using the UITableView class with the iPhone SDK! In this tutorial, we will cover the fundamentals of the UITableView class and the UITableViewDelegate and UITableViewDataSource protocols. By the end of this tutorial, you will understand the basics of how these components fit together, and you will be on your way to creating your own table view based applications!

More On Table Views:

The iPhone SDK documentation describes a table view as a view that represents data in a single column with multiple rows. Table views are frequently used in productivity applications, but have many other, more creative implementations as well. A few examples of official Apple iOS applications that use table views are: iPod, Photos, and Settings. As you can see from these applications, table views help organize information easily. They can be used with the default UI to match other iPhone applications, or they can be completely customized for use in your own custom skin.

The UITableView class renders the cells that display data while the UITableViewDataSource and UITableViewDelegate protocols work in the background to provide that data to the class and respond to table view related events. Table views can be created with two different basic methods. The first method, which is shown in this tutorial, is by adding the table view as a subview of a normal view controller. The second way is to implement a table view directly by using UITableViewController in place of a custom view controller. The table view is a highly customizable class that is extremely efficient to use.

Advertisement