---
title: instantiateInitialViewController()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uistoryboard/instantiateinitialviewcontroller()
---

# instantiateInitialViewController()

Creates the initial view controller and initializes it with the data from the storyboard.

## Declaration

```swift
func instantiateInitialViewController() -> UIViewController?
```

## Return Value

Return Value The initial view controller in the storyboard.

## Discussion

Discussion Every storyboard file has an initial view controller that represents the default view controller to create. Typically, you use the initial view controller as the root view controller for a window. However, you can also instantiate the initial view controller when transitioning to content in a new storyboard file. This method creates a new instance of the initial view controller using its init(coder:) method. When you specify a storyboard in the UISceneStoryboardFile or UIMainStoryboardFile key of your app’s Info.plist file, UIKit loads the initial view controller from that storyboard.

## See Also

### Loading the Initial View Controller

- [instantiateInitialViewController(creator:)](uikit/uistoryboard/instantiateinitialviewcontroller(creator:).md)
