ImmersionStyle
The styles that an immersive space can have.
Declaration
protocol ImmersionStyleOverview
Configure the appearance and behavior of an ImmersiveSpace by adding the immersionStyle(selection:in:) scene modifier to the space and specifying a style that conforms to this protocol, like mixed or full. For example, the following app defines a solar system scene that uses full immersion:
@main
struct SolarSystemApp: App {
@State private var style: ImmersionStyle = .full
var body: some Scene {
ImmersiveSpace {
SolarSystem()
}
.immersionStyle(selection: $style, in: .full)
}
}