Summary
In this chapter, you added a collection view to the Explore screen in Main.storyboard
and added a new file, ExploreViewController.swift
, which contains the implementation of the ExploreViewController
class. You made the ExploreViewController
class the view controller for the scene containing the collection view. Then, you modified the ExploreViewController
class to have an outlet for the collection view in the storyboard, and made it the data source and delegate for the collection view. You added a section header to the collection view and set the size for the collection view cells and collection view section header. Finally, you added a button to display a second view and configured a Cancel button to dismiss it.
At this point, you should be fairly proficient in using Interface Builder to add views and view controllers to a storyboard scene, link view controller outlets to UI elements in storyboards, set up collection view cells and section headers, and present views modally...