apple-pdfkit

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'

我们两清 提交于 2019-12-11 14:54:50
问题 The problem started with the XCode 10.2.x as I guess While it was working fine with the XCode 10.1 The crash point is " pdfView.frame = self.view.frame " from below code: import UIKit import PDFKit class ViewController: UIViewController { var pdfView = PDFView() override func viewDidLoad() { super.viewDidLoad() // Prepare document to show let url = Bundle.main.url(forResource: "sample", withExtension: "pdf") let pdfDocument = PDFDocument(url: url!) // PDFView pdfView = PDFView() pdfView.frame