When working with UIViewController
, UICollectionViewController
, and UITableViewController
, you need to create a class file for each of these elements. Each file handles all of the logic and interactions that the controller sends and receives. Along with interactions, the class file is responsible for receiving data. You should understand this more when we delve more deeply into creating each of these class files.
When working with our UI, we used controllers that were done for you. Now that we know that our UI is in place, we can get rid of these two files. We are going to recreate them together and understand how they work.
- Please select the
ExploreViewController.swift
and cmd + click onRestaurantViewController.swift
. When you do this you should have both files selected:
- Next, hit Delete on your keyboard. You should see the following screen:
- Click on
Move to Trash
.
- If you select
Remove References
, it removes it from the project, but it is still...