Contents

init(_:for:_:onDocumentOpen:)

Creates a view to present when launching document-related user experiences using a localized title and custom actions.

Declaration

nonisolated init(_ title: LocalizedStringKey, for contentTypes: [UTType], @ContentBuilder _ actions: () -> Actions, @ContentBuilder onDocumentOpen: @escaping (URL) -> DocumentView)

Parameters

  • title:

    A title key to use for the view title.

  • contentTypes:

    Content types that the view can open.

  • actions:

    A content builder returning the view’s actions

  • onDocumentOpen:

    A closure that handles an open file.

Discussion