init(_:for:_:onDocumentOpen:)
Creates a view to present when launching document-related user experiences using a localized title and custom actions.
Declaration
init(_ title: LocalizedStringKey, for contentTypes: [UTType], @ViewBuilder _ actions: () -> Actions, @ViewBuilder 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 view builder returning the view’s actions
- onDocumentOpen:
A closure that handles an open file.