Protocol

UIWindowSceneDelegate

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

Declaration

protocol UIWindowSceneDelegate

Overview

Use your UIWindowSceneDelegate object to manage the life cycle of one instance of your app's user interface. The window scene delegate conforms to the UISceneDelegate property, and you use it to receive notifications when its scene connects to the app, enters the foreground, and so on. You also use it to respond to changes in the underlying environment of the scene. For example, if the user resizes a scene, use your delegate to make any needed changes to your content to accommodate the new size.

Do not create UIWindowSceneDelegate objects directly. Instead, specify the name of your delegate class as part of the configuration data for your scene. 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

Managing the Scene's Main Window

var window: UIWindow?

The main window associated with the scene.

Responding to Scene Changes

Performing Tasks

func windowScene(UIWindowScene, userDidAcceptCloudKitShareWith: CKShareMetadata)

Tells the delegate that the window scene now has access to shared information in CloudKit.

Relationships

Inherits From

See Also

Window Scenes

Supporting Multiple Windows on iPad

Use the UIScene lifecycle to support two side-by-side instances of your interface and learn how to create a new window with drag and drop.

class UIWindowScene

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

Beta
protocol UISceneDelegate

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

Beta
class UIScene

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

Beta

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