navigationDocument(_:preview:)
Configures the view’s document for purposes of navigation.
Declaration
nonisolated func navigationDocument<D, I1, I2>(_ document: D, preview: SharePreview<I1, I2>) -> some View where D : Transferable, I1 : Transferable, I2 : Transferable
Parameters
- document:
The transferable content associated to the navigation title.
- preview:
The preview of the document to use when sharing.
Discussion
In iOS, iPadOS, this populates the title menu with a header previewing the document. In macOS, this populates a proxy icon.
Refer to the Configure your apps navigation titles article for more information on navigation document modifiers.