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.

Beta
UIWindowScene

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

Beta
UISceneDelegate

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

Beta
UIScene

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

Beta

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
Beta
UISceneConfiguration

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

Beta
UISceneSession

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

Beta

Activation and Destruction

UISceneActivationConditions

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

Beta
UISceneActivationRequestOptions

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

Beta
UIWindowSceneDestructionRequestOptions

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

Beta
UISceneDestructionRequestOptions

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

Beta

URL Management

UIOpenURLContext

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

Beta
UISceneOpenExternalURLOptions

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

Beta

Errors

UISceneErrorCode

Error codes involving issues with scenes.

Beta
UISceneErrorDomain

The domain for scene-related errors.

Beta

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software