7

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?

mablecable
  • 385
  • 1
  • 6
  • 15

2 Answers2

11

Choose your viewcontroller in storyboard , click show the attributes inspector

and choose initial scene: is initial view controller

enter image description here

SpaceDust__
  • 4,844
  • 4
  • 43
  • 82
1

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.

yoAlex5
  • 29,217
  • 8
  • 193
  • 205