Type Property

didEnterBackgroundNotification

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

Declaration

class let didEnterBackgroundNotification: NSNotification.Name

Discussion

Use this notification to reduce your scene's memory usage, free up any shared resources, and clean up your scene's user interface. Shortly after your notification handler returns, UIKit takes a snapshot of your scene's interface for display in the app switcher. Make sure your interface doesn't contain sensitive user information.

UIKit also calls the sceneDidEnterBackground(_:) method of your scene delegate object.

For more information about what to do when your app enters the background, see Preparing Your UI to Run in the Background.

See Also

Responding to Life Cycle Notifications

class let willConnectNotification: NSNotification.Name

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

Beta
class let didDisconnectNotification: NSNotification.Name

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

Beta
class let willEnterForegroundNotification: NSNotification.Name

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

Beta
class let didActivateNotification: NSNotification.Name

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

Beta
class let willDeactivateNotification: NSNotification.Name

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

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