April 2020
Intermediate to advanced
528 pages
15h 40m
English
In this section, you are going to add functionality to allow a user to navigate to and display a single photo.
Create a new Swift file named PhotoInfoViewController, declare the PhotoInfoViewController class, and add an imageView outlet.
Listing 21.16 Creating the PhotoInfoViewController class (PhotoInfoViewController.swift)
import Foundationimport UIKit class PhotoInfoViewController: UIViewController { @IBOutlet var imageView: UIImageView! }
Now set up the interface for this view controller. Open Main.storyboard and drag a new View Controller onto the canvas from the library. With this view controller selected, open its identity inspector and change the Class to PhotoInfoViewController.
Add an ...
Read now
Unlock full access