Contents

body

The content and behavior of the scene.

Declaration

@SceneBuilder @MainActor @preconcurrency var body: Self.Body { get }

Discussion

For any scene that you create, provide a computed body property that defines the scene as a composition of other scenes. You can assemble a scene from built-in scenes that SwiftUI provides, as well as other scenes that you’ve defined.

Swift infers the scene’s Body associated type based on the contents of the body property.

See Also

Creating a scene