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 22, 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. The
ReviewFormViewController
file will appear in the Project navigator. - Delete all the code and comments after the
viewDidLoad()
method. Add the following outlets after the class...