Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

11. Creating and Managing Table Views > Recipe: Implementing a Basic Table

Recipe: Implementing a Basic Table

The UITableViewController class embeds a UITableView into a UIViewController object that manages its table view. This view is accessed via the tableView property. These controllers automatically set the data source and delegate methods for the table view to itself. So it’s really a plug-and-play situation. For a really basic table, all you need to bring to the table is some data and a few data source functions that feed cells and report the number of rows and sections.

Populating a Table

Pretty much any array of strings can be used to set up and populate a table. Recipe 11-1 builds an array of strings from a collection of letters and uses this to create its flat (nonsectioned) table presentation.

items = [@"A*B*C*D*E*F*G*H*I*J*K*L"
    componentsSeparatedByString:@"*"];


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial