Friday, August 19, 2022
HomeiOS Developmentios - Swift PDFKit the best way to scroll to particular level...

ios – Swift PDFKit the best way to scroll to particular level programmatically

[ad_1]

I’ve vertical scrolling pdfView:

var pdfView = PDFView()

        pdfView.displayDirection = .vertical
        pdfView.usePageViewController(false)
        pdfView.pageBreakMargins = UIEdgeInsets(prime: 0, left: 0, backside: 0, proper: 0)
        pdfView.autoScales = true
        
        pdfView.backgroundColor = .black

I can scroll and zoom pdf file.

However how can I scroll pdfView programmatically?

pdfView.go(to: someCGRect, on: somePage)

I already know go(to:, on:), however it simply jumps to that time and web page with out scrolling.

go(to: PDFPage) Scrolls, however simply specified web page.

reference: https://developer.apple.com/documentation/pdfkit/pdfview/navigation

[ad_2]

RELATED ARTICLES

Most Popular

Recent Comments