Scenes

Manage multiple instances of your app’s UI simultaneously, and direct resources to the appropriate instance of your UI.

Overview

UIKit manages each instance of your app's UI using a UIWindowScene object. A scene contains the windows and view controllers for presenting one instance of your UI. Each scene also has a corresponding UIWindowSceneDelegate object, which you use to coordinate interactions between UIKit and your app. Scenes run concurrently with each other, sharing the same memory and app process space. As a result, a single app may have multiple scenes and scene delegate objects active at the same time.

An image showing two instances of the Notes app running side-by-side on iPad.

Manage the configuration of new scenes from your UIApplicationDelegate object.

Topics

Essentials

Preparing Your UI to Run in the Foreground

Configure your app to appear onscreen.

Preparing Your UI to Run in the Background

Prepare your app to be suspended.

Window Scenes

UIWindowSceneDelegate

Additional methods that you use to manage app-specific tasks occurring in a scene.

UIWindowScene

A specific type of scene that manages one or more windows for your app.

UISceneDelegate

The core methods you use to respond to life-cycle events occurring within a scene.

UIScene

An object that represents one instance of your app's user interface.

Configuration

Specifying the Scenes Your App Supports

Tell the system about your app’s scenes, including the objects you use to manage each scene and its initial user interface.

property list key UIApplicationSceneManifest

The information about the app's scene-based life-cycle support.

Name: Application Scene Manifest
UISceneConfiguration

Information about the objects and storyboard for UKit to use when creating a particular scene.

UISceneSession

An object containing information about one of your app's scenes.

Activation and Destruction

UISceneActivationConditions

The set of conditions that define when UIKit activates the current scene.

UISceneActivationRequestOptions

An object containing information you want the system to use when activating the session associated with a scene.

UIWindowSceneDestructionRequestOptions

An object containing information to use when removing a window scene from your app.

UISceneDestructionRequestOptions

An object you pass to UIKit when you want to permanently remove a scene and its associated session from your app.

URL Management

UIOpenURLContext

A system-provided object that contains the information you need to open a single URL.

UISceneOpenExternalURLOptions

Options you specify when asking a scene to open a URL.

Errors

UISceneErrorCode

Error codes involving issues with scenes.

UISceneErrorDomain

The domain for scene-related errors.

See Also

Life Cycle

Managing Your App's Life Cycle

Respond to system notifications when your app is in the foreground or background, and handle other significant system-related events.

Responding to the Launch of Your App

Initialize your app’s data structures, prepare your app to run, and respond to any launch-time requests from the system.

UIApplication

The centralized point of control and coordination for apps running in iOS.

UIApplicationDelegate

A set of methods that you use to manage shared behaviors for your app.