The first scene

Create a project group (command + option + N) for the view controllers and move the ViewController.swift file (created by Xcode) to this group. As we are going to have more than one view controller, it would also be a good idea to rename it to InitialViewController.swift:

The first scene

Now, open this file and rename its class from ViewController to InitialViewController:

class InitialViewController: UIViewController {

Once the class is renamed, we need to update the corresponding view controller in the storyboard by:

  • Clicking on the storyboard.
  • Selecting the view controller (the only one we have till now).
  • Going to the Identity inspector by using the ...

Get Swift 2 Blueprints 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.