Creating the ReviewFormViewController class
To process user input, you'll create the ReviewFormViewController
class to be the view controller for the Review Form screen. For the time being, you'll configure this class to grab all the values from the Review Form screen's fields and print them in the Debug area. You will learn how to store reviews later in Chapter 21, Understanding Core Data. Follow these steps:
- Right-click the
ReviewForm
folder and select New File. - iOS should already be selected. Choose Cocoa Touch Class and then click Next.
- Configure the file as follows:
Class:
ReviewFormViewController
Subclass:
UITableViewController
Also create XIB: Unchecked
Language:
Swift
Click Next.
- Click Create.
ReviewFormViewController.swift
will appear in the Project navigator. - Delete everything after the
viewDidLoad()
method and add the following outlets after the class declaration. They correspond to the fields inside the Review Form screen:@IBOutlet weak...