<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/persistentSystemOverlays(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE24persistentSystemOverlaysyQrAA10VisibilityOF"
  },
  "title" : "persistentSystemOverlays(_:)"
}
-->

# persistentSystemOverlays(_:)

Sets the preferred visibility of the non-transient system views
overlaying the app.

```
nonisolated func persistentSystemOverlays(_ visibility: Visibility) -> some View
```

## Parameters

`visibility`

A value that indicates the visibility of the
non-transient system views overlaying the app.

## Discussion

Use this modifier to influence the appearance of system overlays
in your app. The behavior varies by platform.

In iOS, the following example hides every persistent system overlay.
In visionOS 2 and later, the SharePlay Indicator hides if the
scene is shared through SharePlay, or not shared at all.
During screen sharing, the indicator always remains visible.
The Home indicator doesn’t appear without specific user intent
when you set visibility to `hidden`. For a [`WindowGroup`](/documentation/SwiftUI/WindowGroup),
the modifier affects the visibility of the window chrome. For an
[`ImmersiveSpace`](/documentation/SwiftUI/ImmersiveSpace), it affects the Home indicator.

```
struct ImmersiveView: View {
    var body: some View {
        Text("Maximum immersion")
            .persistentSystemOverlays(.hidden)
    }
}
```

> Note: You can indicate a preference with this modifier, but the system
> might or might not be able to honor that preference.

Affected non-transient system views can include, but are not limited to:

- The Home indicator.
- The SharePlay indicator.
- The Multitasking Controls button and Picture in Picture on iPad.

---

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)