O'Reilly logo

Mastering iOS 11 Programming - Second Edition by Donny Wals

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

Implementing the expanded view

The expanded view for our iMessage app will be a table view that lists all of the quotes in the Quote struct. We'll use a similar setup to what we used before by creating a new view controller file and using the delegate protocol that was defined earlier to communicate the selection of a quote back to the MessagesViewController.

First, create a new UITableViewController subclass and name it QuotesTableViewController. You can remove most of the commented template code; the only methods you should keep are tableView(_:cellForRowAt:), tableView(_:numberOfRowsInSection:), and numberOfSections(in:). In addition to the commented delegate methods, you can remove the viewDidLoad() and didReceiveMemoryWarning() methods; ...

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