AppKitUtils

enum AppKitUtils

A collection of AppKit functions and View Representable’s

  • SwiftUI NSViewRepresentable for a PDF View

    See more

    Declaration

    Swift

    struct PDFKitRepresentedView: 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…
    See more

    Declaration

    Swift

    public struct QLPreviewRepresentedView: NSViewRepresentable
  • SwiftUI NSViewRepresentable for a Sharing Service Picker

    See more

    Declaration

    Swift

    struct SharingServiceRepresentedView: NSViewRepresentable
  • Show a AppKit Print Dialog for a PDF

    Declaration

    Swift

    static func printDialog(exportURL: URL)

    Parameters

    exportURL

    The URL of the export PDF