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:configurationForConnectingSceneSession:options: method. For more information about how to configure scenes, see Specifying the Scenes Your App Supports.

Topics

Managing the Scene's Main Window

window

The main window associated with the scene.

Responding to Scene Changes

- windowScene:didUpdateCoordinateSpace:interfaceOrientation:traitCollection:

Notifies you when the size, orientation, or traits of a scene change.

Performing Tasks

- windowScene:performActionForShortcutItem:completionHandler:

Asks the delegate to perform the user-selected action.

- windowScene:userDidAcceptCloudKitShareWithMetadata:

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

Relationships

Inherits From

See Also

Window Scenes

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.