-1

I am using PDFKit and added a PDFView to my ViewControllers view. I want to know where the current PDFPages position in my main view is. Normally i would use the convert() function given by UIView but PDFPage is not a UIView. Any ideas ?

1 Answers1

0

In my case, I put a NotificationCenter to see every time the pdfView was swiped with this

NotificationCenter.default.addObserver(self, selector: #selector(viewDidSwipe), name: Notification.Name.PDFViewPageChanged, object: nil)

Then, in the viewDidSwipe function,

   @objc func viewDidSwipe(){
        let currentSlideCount = pdfView.currentPage?.label
        self.title = currentSlideCount!
   }
Yuto
  • 658
  • 2
  • 8
  • 20