iOS Quick Tip: Setting the default view controller on a storyboard

Figuring out how to set the default view controller on a storyboard is surprisingly unintuitive, especially as someone new to iOS development. It seemed logical to me that it would be some sort of setting on the storyboard itself. However, it’s actually the exact opposite – it’s a setting on the view controller.

This is somewhat bizzare as it means setting a property on one view controller can affect other view controllers, but nevertheless, it’s quite simple. Here’s what you need to do:

  • Open your storyboard
  • Click on the view controller corresponding to the view that you want to be the default view
  • Open the Attributes Inspector
  • Check the Is Initial View Controller check box in the View Controller section

Voila! Your view controller is now the default view controller for this storyboard.

One Comment

Leave a Reply

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