---
title: instantiateInitialController()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsstoryboard/instantiateinitialcontroller()
---

# instantiateInitialController()

Creates the initial view controller or window controller from a storyboard.

## Declaration

```swift
func instantiateInitialController() -> Any?
```

## Return Value

Return Value The initial view controller or window controller for the storyboard.

## Discussion

Discussion Every storyboard has an initial view controller or window controller that represents its starting point. For the main storyboard, this is usually the first controller presented to the user at launch time. Designate the initial view controller in Interface Builder when configuring the storyboard file. Typically, you call this method only when transitioning to the initial view controller in a different storyboard file. For your app’s main storyboard file—that is, the storyboard file specified in the app’s Info.plist file using the UIMainStoryboardFile key—the initial view controller is loaded into memory and presented automatically. Each time you call this method, it creates a new instance of the initial controller.

## See Also

### Loading the Initial View Controller

- [instantiateInitialController(creator:)](appkit/nsstoryboard/instantiateinitialcontroller(creator:)-pi04.md)
- [instantiateInitialController(creator:)](appkit/nsstoryboard/instantiateinitialcontroller(creator:)-529r1.md)
