简体   繁体   中英

How should be defined the options dictionary for PDFView usePageViewController withViewOptions:

How should be defined a dictionary of options for a pageViewController for a PDFView from PDFKit?

I am interested particulari with this flag

UIPageViewController.NavigationOrientation.horizontal

let pdfv = PDFView.init(frame: self.view.frame)

let opt = ?????

pdfv.usePageViewController(true, withViewOptions: opt)

The ViewOptions contains only 2 options: interPageSpacing and spineLocation : https://developer.apple.com/documentation/uikit/uipageviewcontroller/optionskey

Exemple: pdfv.usePageViewController(true, withViewOptions: ["interPageSpacing": 50])

If you want to change the pageViewController direction to horizontal, use this code:

pdfv.displayDirection = .horizontal

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM