Connecting a second ViewContoller to another Swift file

  1. Make sure the swift file looks like the default ViewContoller.swift file
    i.e. import UIKit, inherits from UIViewController, have at least the viewDidLoad function
  2. Click on the yellow dot that represents the view controller in the story board
  3. Select the identify inspector page
  4. In the Class drop down at the top, you should be able to select the name of your new class
    NOTE: you may have to save and or compile you app to get the new class to appear on the list.

Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *