---
title: "persistentSystemOverlays(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/scene/persistentsystemoverlays(_:)"
---

# persistentSystemOverlays(_:)

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

## Declaration

```swift
nonisolated func persistentSystemOverlays(_ preferredVisibility: Visibility) -> some Scene

```

## Parameters

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

## Discussion

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, the modifier affects the visibility of the window chrome. For an 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.

## See Also

### Configuring window visibility

- [WindowVisibilityToggle](swiftui/windowvisibilitytoggle.md)
- [defaultLaunchBehavior(_:)](swiftui/scene/defaultlaunchbehavior(_:).md)
- [restorationBehavior(_:)](swiftui/scene/restorationbehavior(_:).md)
- [SceneLaunchBehavior](swiftui/scenelaunchbehavior.md)
- [SceneRestorationBehavior](swiftui/scenerestorationbehavior.md)
- [windowToolbarFullScreenVisibility(_:)](swiftui/view/windowtoolbarfullscreenvisibility(_:).md)
- [WindowToolbarFullScreenVisibility](swiftui/windowtoolbarfullscreenvisibility.md)
