QLPreviewRepresentedView
public struct QLPreviewRepresentedView: NSViewRepresentable
Show a QL preview of an URL
Note
I don’t use the SwiftUI.quickLookPreview($url) here because
that seems to conflict with a NSTextView in a `NSViewRepresentable.
Unsaved documents cannot be previewed on macOS 14 for some unknown reason…
-
The URL to view
Declaration
Swift
var url: URL -
Init the
ViewDeclaration
Swift
public init(url: URL)Parameters
urlThe URL to view
-
Make the
ViewDeclaration
Swift
public func makeNSView(context: NSViewRepresentableContext<QLPreviewRepresentedView>) -> QLPreviewView -
Update the
ViewDeclaration
Swift
public func updateNSView( _ nsView: QLPreviewView, context: NSViewRepresentableContext<QLPreviewRepresentedView> )
View on GitHub