Hooking Up the Content
To display the information for the selected Item, you will need to create a new UIViewController subclass.
Create a new Swift file and name it DetailViewController. Open DetailViewController.swift and declare a new UIViewController subclass named DetailViewController.
import Foundationimport UIKit class DetailViewController: UIViewController { }
Because you need to be able to access these subviews during runtime, DetailViewController needs outlets for them. The plan is to add four new outlets to DetailViewController and then make the connections. In previous exercises, you did this in two distinct steps: first, you added the outlets in the Swift file, and second, you made connections in the storyboard file. ...
Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.