---
title: replace
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/immersiveenvironmentbehavior/replace
---

# replace

A behavior that replaces any currently opened immersive environment with the new scene.

## Declaration

```swift
static var replace: ImmersiveEnvironmentBehavior { get }
```

## Discussion

Discussion Use this value with the immersiveEnvironmentBehavior(_:) scene modifier to define that the system should hide the system’s immersive environment before opening the scene.
