Instance Method

sceneDidEnterBackground:

Tells the delegate that the scene is running in the background and is no longer onscreen.

Declaration

- (void)sceneDidEnterBackground:(UIScene *)scene;

Parameters

scene

The scene that entered the background.

Discussion

Use this method to reduce your scene's memory usage, free up any shared resources, and clean up your scene's user interface. Shortly after you return from this method, 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.

In addition to calling this method, UIKit also posts a UISceneDidEnterBackgroundNotification notification. For more information about what to do when your app enters the background, see Preparing Your UI to Run in the Background.

See Also

Transitioning to the Background

- sceneWillResignActive:

Tells the delegate 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