init(_:for:backgroundStyle:_:onDocumentOpen:)
Creates a view to present when launching document-related user experiences using a localized title, custom actions, and a background style.
Declaration
init<B>(_ title: LocalizedStringKey, for contentTypes: [UTType], backgroundStyle: B, @ViewBuilder _ actions: () -> Actions, @ViewBuilder onDocumentOpen: @escaping (URL) -> DocumentView) where B : ShapeStyleParameters
- title:
A title key to use for the view title.
- contentTypes:
Content types that the view can open.
- backgroundStyle:
An optional background style of the view.
- actions:
A view builder returning the view’s actions
- onDocumentOpen:
A closure that handles an open file.