---
title: "sceneDidEnterBackground(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiscenedelegate/scenedidenterbackground(_:)"
---

# sceneDidEnterBackground(_:)

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

## Declaration

```swift
optional func sceneDidEnterBackground(_ scene: UIScene)
```

## Parameters

- `scene`: The scene that entered the background.

## Mentioned in

Transitioning to the UIKit scene-based life cycle

## Discussion

Discussion To use this method, you must implement the UISceneDelegate protocol and configure scenes for your app (see Specifying the scenes your app supports). 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 this method 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. In addition to calling this method, UIKit posts a didEnterBackgroundNotification notification from UIApplication and UIScene. For more information about what to do when your app enters the background, see Preparing your UI to run in the background. note: When you implement this method and enable scenes, UIKit calls this method but does not call the applicationDidEnterBackground(_:) method on UIApplicationDelegate.

## See Also

### Transitioning to the background

- [sceneWillResignActive(_:)](uikit/uiscenedelegate/scenewillresignactive(_:).md)
