func quickLookPreview (Binding<URL?>) -> some View
Presents a Quick Look preview of a single URL.
Availability 有効性
Technology
func quickLookPreview<Items>(_ selection: Binding
<Items.Element?>, in items: Items) -> some View
where Items : RandomAccessCollection
, Items.Element == URL
selection
A Binding
to an element that is part of the items
collection. This is the URL that should be currently previewed.
items
A collection of URLs to preview.
Quick Look will not appear until a non-nil
selection
is set. When selection
is set back to nil
, the preview is dismissed. If the value of the selection
binding is not contained in the items
collection, it is treated the same as a nil
selection
.
The value of the selection
binding is updated by Quick Look to match the URL of the file the user is previewing.
Upon dismissal, Quick Look automatically sets the selection
binding to nil
.
func quickLookPreview (Binding<URL?>) -> some View