2

Is there a way to adapt to pdf document with the dark mode of containing view? Below doesn't change any aspect of PDF document.

let pdfView = PDFView()        
pdfView.overrideUserInterfaceStyle = .dark
guard let documentUrl = Bundle.main.url(forResource: "mPilot", withExtension: "pdf") else { return }         
guard let document = PDFDocument(url: documentUrl) else { return }
            
pdfView.document = document
nvn
  • 21
  • 2
  • I was looking for the same thing. I don't think this exists right now. I saw a Twitter post about the things devs want most from Swift, and one posted "dark mode for PDFKit", which confirms my suspicion it's not doable. There's a 3rd-party commercial lib called PSPDF that seems to have this capability somewhat, as they address it in their documentation. – James Toomey Aug 03 '22 at 17:25

0 Answers0