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?
Specifying the Initial View ControllerOpen Main. storyboard and select the Tab Bar Controller Scene. On the right, select the Attribute inspector. You'll find a checkbox named Is Initial View Controller.
The view controller calls its loadView method.
Choose your viewcontroller in storyboard , click show the attributes inspector
and choose initial scene: is initial view controller
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With