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:
Get iOS 9 SDK Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.