Contents

init(_:_:background:backgroundAccessoryView:overlayAccessoryView:)

Creates a launch scene for document-based applications with a title, a set of actions, and a background.

Declaration

@export(implementation) nonisolated init(_ title: LocalizedStringResource, @ContentBuilder _ actions: () -> Actions, @ContentBuilder background: () -> some View, @ContentBuilder backgroundAccessoryView: @escaping (DocumentLaunchGeometryProxy) -> some View, @ContentBuilder overlayAccessoryView: @escaping (DocumentLaunchGeometryProxy) -> some View)

Parameters

  • title:

    A resource to use for the view title.

  • actions:

    A content builder for returning the view’s actions.

  • background:

    The background of the scene.

  • backgroundAccessoryView:

    A content builder for returning the view’s background accessory view.

  • overlayAccessoryView:

    A content builder for returning the view’s overlay accessory view.

Discussion

Use a DocumentGroupLaunchScene alongside any DocumentGroup scenes. If you don’t implement a DocumentGroup in the app declaration, you can get the same design by implementing a DocumentLaunchView.

See Also

Creating a launch scene with a background view