Contents

ProgressiveImmersionAspectRatio

The shape of the portal that a progressive immersion style opens.

Declaration

struct ProgressiveImmersionAspectRatio

Overview

A progressive immersive space replaces passthrough inside a portal that people resize with the Digital Crown. Pass a value of this type to progressive(aspectRatio:) to ask for a wide or a tall portal, which lets the shape suit the content you show:

@main
struct MatchApp: App {
    @State private var style: any ImmersionStyle =
        .progressive(aspectRatio: .landscape)

    var body: some Scene {
        ImmersiveSpace {
            MatchView()
        }
        .immersionStyle(selection: $style, in: style)
    }
}

The system chooses a shape for you when you pass automatic.

Topics

Type Properties

See Also

Creating an immersive space