<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISceneDelegate/sceneDidEnterBackground(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UISceneDelegate(im)sceneDidEnterBackground:"
  },
  "title" : "sceneDidEnterBackground(_:)"
}
-->

# sceneDidEnterBackground(_:)

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

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

## Parameters

`scene`

The scene that entered the background.

## Discussion

To use this method, you must implement the [`UISceneDelegate`](/documentation/UIKit/UISceneDelegate) protocol and configure scenes for your app (see [Specifying the scenes your app supports](/documentation/UIKit/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`](/documentation/UIKit/UIScene/didEnterBackgroundNotification) notification from [`UIApplication`](/documentation/UIKit/UIApplication) and [`UIScene`](/documentation/UIKit/UIScene).

For more information about what to do when your app enters the background, see [Preparing your UI to run in the background](/documentation/UIKit/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 ``doc://com.apple.uikit/documentation/UIKit/UIApplicationDelegate/applicationDidEnterBackground(_:)`` method on ``doc://com.apple.uikit/documentation/UIKit/UIApplicationDelegate``.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)