<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIStoryboard",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIStoryboard"
  },
  "title" : "UIStoryboard"
}
-->

# UIStoryboard

An encapsulation of the design-time view controller graph represented in an Interface Builder storyboard resource file.

```
@MainActor class UIStoryboard
```

## Overview

A [`UIStoryboard`](/documentation/UIKit/UIStoryboard) object manages archived versions of your app’s view controllers. At design time, you configure the content of your view controllers visually, and Xcode saves the data needed to recreate that interface in a storyboard file in your app’s bundle. When you want to create a new view controller programmatically, first create a [`UIStoryboard`](/documentation/UIKit/UIStoryboard) object and specify the appropriate name and bundle information. Then use that object to instantiate the specific view controller that you want.

During the instantiation process, [`UIStoryboard`](/documentation/UIKit/UIStoryboard) creates your view controller programmatically using its [`init(coder:)`](/documentation/UIKit/UIViewController/init(coder:)) method. The storyboard passes the view controller’s data archive to that method, which then uses the data to recreate the state of the view controller and its views. If you have a custom initialization method for your view controller, you can ask the storyboard to instantiate your view controller using a block you provide. You can use this block to call your custom initialization method, passing any extra data your view controller needs.

For visionOS apps, you can load existing storyboards, but you can’t add content specific to the platform. Migrate your interface code to SwiftUI as soon as possible.

## Topics

### Getting a Storyboard Object

[`init(name:bundle:)`](/documentation/UIKit/UIStoryboard/init(name:bundle:))

Creates and returns a storyboard object for the specified resource file.

### Loading the Initial View Controller

[`instantiateInitialViewController()`](/documentation/UIKit/UIStoryboard/instantiateInitialViewController())

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

[`instantiateInitialViewController(creator:)`](/documentation/UIKit/UIStoryboard/instantiateInitialViewController(creator:))

Creates the initial view controller from the storyboard and initializes it using your custom initialization code.

[`instantiateInitialViewControllerWithCreator:`](/documentation/UIKit/UIStoryboard/instantiateInitialViewControllerWithCreator:)

Creates the initial view controller from the storyboard and initializes it using your custom initialization code.

### Instantiating Storyboard View Controllers

[`instantiateViewController(withIdentifier:)`](/documentation/UIKit/UIStoryboard/instantiateViewController(withIdentifier:))

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

[`instantiateViewController(identifier:creator:)`](/documentation/UIKit/UIStoryboard/instantiateViewController(identifier:creator:))

Creates the specified view controller from the storyboard and initializes it using your custom initialization code.

[`instantiateViewControllerWithIdentifier:creator:`](/documentation/UIKit/UIStoryboard/instantiateViewControllerWithIdentifier:creator:)

Creates the specified view controller from the storyboard and initializes it using your custom initialization code.

[`UIStoryboardViewControllerCreator`](/documentation/UIKit/UIStoryboardViewControllerCreator)

A handler block that contains the custom initialization code for a view controller you instantiate from a storyboard.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)
