I'm having an issue with the displaying a PDF using hte new PDFKit Beta for ios 11 beta. When loading the pdf in PDF view, the PDF displays. However, about the top inch of the page is clipped. I can touch the view and pull down to scroll the pdf so that I can see the top inch of of the PDF. I can't seem to find a way to make PDFView scroll and display the top when the pdf is originaly loaded. Am I missing something? Here is my code, which is based on the PDFAnnotationAnnotationWidgetsAdvanced.
if let documentURL = Bundle.main.url(forResource: "Acupuncture Intake", withExtension: "pdf"),
let document = PDFDocument(url: documentURL),
let pg = document.page(at: 0) {
pdfView?.document = pg.document
pdfView?.autoScales = true
pdfView?.backgroundColor = UIColor.lightGray
pdfView?.displaysPageBreaks = true;
pdfView?.displayMode = .singlePage
}