Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable pdf view(PDFKIT) internal scrolling?

in my mac application pdfkit using for pdf reader.while scroll the mouse scroll the pages changing how can avoid that.pdfview's display mode is kPDFDisplaySinglePage.No need to work scroll Please help me

like image 493
SHEBIN Avatar asked Sep 23 '15 11:09

SHEBIN


1 Answers

Hacky, brittle and a year or two too late, but... the first subview of your PDFView is a private NS/UIScrollView-derived PDFScrollView. Simply cast this and change its isScrollEnabled property to false, e.g. for iOS:

(yourPdfView.subviews[0] as! UIScrollView).isScrollEnabled = false

Alternatively, and probably a better answer: turn off user interaction for the view, or otherwise intercept and handle it.

like image 74
Robin Macharg Avatar answered Nov 10 '22 16:11

Robin Macharg