Refactoring RestaurantListViewController

You will add two extensions to RestaurantListViewController, similar to those you added to ExploreViewController. Perform the following steps:

  1. Click RestaurantListViewController.swift in the Project navigator. After the final curly brace, press Return a few times and add the following:
// MARK: Private Extensionprivate extension RestaurantListViewController {    // code goes here}// MARK: UICollectionViewDataSourceextension RestaurantListViewController: UICollectionViewDataSource {    // code goes here}

As before, you'll put private methods for RestaurantListViewController in the first extension, and all of the collection view data source methods in the second extension.

  1. Delete UICollectionViewDataSource ...

Get iOS 13 Programming for Beginners - Fourth Edition 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.