1

PDFKit's PDFView seems to not be compatible with dark mode. It's effectiveAppearance does not get updated when user switches to dark mode.

override public func updateLayer() {
    print("mode = \(effectiveAppearance.name)")
    super.updateLayer()
}
// even in dark mode, always prints: mode = NSAppearanceName(_rawValue: NSAppearanceNameAqua)

Is there any reason for that? Any elegant workaround to change PDFView's background color with dark mode?

vomi
  • 993
  • 8
  • 18

0 Answers0