Xcode how to change which viewController loads first at start-up

10,341

Solution 1

Choose your viewcontroller in storyboard , click show the attributes inspector

and choose initial scene: is initial view controller

enter image description here

Solution 2

Initial View Controller

Initial View controller allows you to initiate storyboard without Storyboard ID

let storyboard = UIStoryboard(name: String(describing: SomeViewController.self), bundle: nil)
let initialViewController = storyboard.instantiateInitialViewController()

Xcode 10.3

Storyboard -> View Controller

Show Inspectors -> Show the Attributes inspector -> Is Initial View Controller

It will update the Initial view controller in the same .storyboard.

Share:
10,341

Related videos on Youtube

mablecable
Author by

mablecable

Updated on July 11, 2022

Comments

  • mablecable
    mablecable almost 2 years

    I am using storyboards, xcode 4.6.1. I have created an app, but now I want to go back and add a new view controller to the beginning. How do I assign this view controller to be the first one to load up at run-time?