O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and Connecting Tables

We’re going to need to make some major changes to our user interface to switch to a table-driven approach. In fact, we’re going to blow away our original view entirely. We’ll get all our functionality back eventually, and we’ll be in a better position to build out deeper and more interesting features. Eventually, we’ll have an app that looks and feels like a real Twitter client.

We’ll start by preparing our view controller to supply the table data. We can do this by either declaring that we implement UITableViewDataSource, or by becoming a subclass of UITableViewController. Since the table will be the only thing in this view, let’s do the latter. In ViewController.swift, rewrite the declaration like this:

Tables/PragmaticTweets-5-1/PragmaticTweets/ViewController.swift ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required