Hey there,
I'm currently developing an app that consists of a full-screen PDFView, and I want the program to remember the position in the document before the view is dismissed so the user can pick up where they've left.
I'm currently retrieving the location in the document with the PDFDestination object from PDFView.currentDestination, and restoring it using PDFView.go(to destination: PDFDestination). However, I realised that the view will not correctly restore it to the correct location.
The following code is used to test out the issue, with a multi-page document:
Timer.scheduledTimer(withTimeInterval: 1, repeats: true, block: { _ in
self.DocumentView.go(to: self.DocumentView.currentDestination!)
})
self.DocumentView is an instance of the PDFView class
Upon execution, the page would spontaneously scroll down by a fixed offset, despite currentDestination remains unchanged.
The same outcome was observed on an iPadOS 14.5 simulator and an iPadOS 15 iPad Air (Gen 4).
It'd be great if somebody can help.
Cheers, Lincoln