Restaurant Listing
Now that we have our Explore listing going to our Restaurant listing, we need to get our Collection View connected to our RestaurantListViewController
. The first thing we should do is create a folder inside of the Restaurant
folder:
Right-click on the
Restaurant
folder and create a group calledRestaurant List
.Then, right-click on the
Restaurant List
folder and create two new groups—Controller
andView
.Right-click on the
Controller
and select New File.Inside of the template screen, select iOS at the top and then Cocoa Touch Class. Then, hit Next.
You will now see an options screen. Add the following:
New File:
Class:
RestaurantListViewController
Subclass…:
UIViewController
Also create XIB:
Unchecked
Language:
Swift
After hitting Next, you will be asked to create this file. Select Create, and your file should look like mine:
Let's delete both didReceiveMemoryWarning()
and prepare()
(which has been commented out) as we do not need them at this time.
Next, we need to drag out a UICollectionView...