You will modify RestaurantListViewController in order to adopt the collection view data source and delegate protocols and add the required protocol methods. You'll also add an outlet for the collection view and make RestaurantListViewController the view controller for the view. Go through the following steps:
- Modify the RestaurantListViewController class declaration, as shown in the following code, to adopt the UICollectionViewDataSource and UICollectionViewDelegate protocols:
class RestaurantListViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate {
- When the error icon appears, click it.
- You can see this error because the methods that are required to conform ...