Exploring controllers and classes
So far, you have implemented view controller scenes in the Main
storyboard file using Interface Builder. You added ExploreViewController
, a view controller that manages the collection view inside the Explore screen, and RestaurantListViewController
, a view controller that manages the collection view inside the Restaurant List screen, to your project. However, you still haven’t learned how the code you added to each view controller works, so let’s look at that now.
You may wish to re-read Chapter 11, Building Your User Interface, where you created the ExploreViewController
class, and Chapter 12, Finishing Up Your User Interface, where you created the RestaurantListViewController
class.
When a typical iOS app is launched, the view controller for the first screen to be displayed is loaded. The view controller has a view
property, and automatically loads the view instance assigned to its view
property...