Contents

UISceneDelegate

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

Declaration

@MainActor protocol UISceneDelegate : NSObjectProtocol

Overview

Use your UISceneDelegate object to manage life-cycle events in one instance of your app’s user interface. This interface defines methods for responding to state transitions that affect the scene, including when the scene enters the foreground and becomes active, and when it enters the background. Use your delegate to provide appropriate behavior when these transitions occur. For example, finish critical tasks and quiet your app when it enters the background.

Don’t create UISceneDelegate objects directly. Instead, specify the name of your custom delegate class as part of the configuration data for your scenes. You can specify this information in your app’s Info.plist file, or in the UISceneConfiguration object you return from your app delegate’s application(_:configurationForConnecting:options:) method. For more information about how to configure scenes, see Specifying the scenes your app supports.

Topics

Working with window scenes

Connecting and disconnecting the scene

Transitioning to the foreground

Transitioning to the background

Opening URLs

Continuing user activities

Saving the state of the scene

See Also

Window scenes