init(_:for:backgroundStyle:_:onDocumentOpen:overlayAccessoryView:)
Creates a view to present when launching document-related user experiences using a localized title, custom actions, a background style, and an overlay accessory view.
Declaration
init<B>(_ title: LocalizedStringKey, for contentTypes: [UTType], backgroundStyle: B, @ViewBuilder _ actions: () -> Actions, @ViewBuilder onDocumentOpen: @escaping (URL) -> DocumentView, @ViewBuilder overlayAccessoryView: @escaping (DocumentLaunchGeometryProxy) -> some View) 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.
- overlayAccessoryView:
A view builder for returning the view’s overlay accessory view.