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


@interface UIScene : UIResponder


UIKit creates a scene object for each instance of your app's UI that the user or your app requests. Typically, UIKit creates a UIWindowScene object instead of a UIScene object, but you use the methods and properties of this class to access information about a scene.

Every scene object has an associated delegate object, an object that adopts the UISceneDelegate protocol. When the state of the scene changes, the scene object notifies its delegate object and posts appropriate notifications to registered observer objects. Use the delegate object and notifications to respond to changes in the state of the scene. For example, use it to determine when your scene moves to the background.

You do not create scene objects directly. You can programmatically ask UIKit to create a scene object for your app by calling the requestSceneSessionActivation:userActivity:options:errorHandler: method of UIApplication. UIKit also creates scenes in response to user interactions. When configuring your app's scene support, specify UIWindowScene objects instead of UIScene objects.


Creating a Scene Object

- initWithSession:connectionOptions:

Creates a scene object using the specified session and connection information.

Managing the Life Cycle of a Scene


The object you use to receive life-cycle events associated with the scene.


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

Getting the Scene Attributes


The current execution state of the scene.


Constants indicating the foreground or background execution state of your app.


A user-visible string you supply to help users differentiate among your app's scenes.

Specifying the Scene's Activation Conditions


The conditions that define when UIKit activates the scene object.

Responding to Life Cycle Notifications


A notification indicating that UIKit added a scene to your app.


A notification indicating that UIKit removed a scene from your app.


A notification indicating that a scene is about to begin running in the foreground and become visible to the user.


A notification indicating that the scene is now onscreen and responding to user events.


A notification indicating that the scene is about to resign the active state and stop responding to user events.


A notification indicating that the scene is running in the background and is no longer onscreen.

Getting the Scene's Session


The session associated with the scene.

Opening URLs

- openURL:options:completionHandler:

Attempts to open the resource at the specified URL asynchronously.


Inherits From

See Also

Window Scenes


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


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


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