Creating a View Controller

The BNRAppDelegate class was created for you by the Empty Application template, but you will have to create the BNRQuizViewController class. We will talk more about classes in Chapter 2 and more about view controllers in Chapter 6. For now, just follow along.

From the File menu, select NewFile.... A sheet will slide down asking what type of file you would like to create. On the lefthand side under the iOS section, select Cocoa Touch. Then choose Objective-C Class and click Next.

Figure 1.8  Creating an Objective-C class

Creating an Objective-C class

On the next sheet, name the class BNRQuizViewController. For the Subclass ...

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.