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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.