[英]Add pagination for a pdfdocument ios swift
我已经创建了一个pdf文档,并使用PDFKit将其显示在PDFView中。有没有直接的方法可以将页面显示为分页。
YEs, they have a built in method called usePageViewController(enable:options:)
you can use this on your PDFView
object in the viewDidAppear
and it will show you it in a UIPageViewController. 是的,它们有一个名为
usePageViewController(enable:options:)
的内置方法,您可以在viewDidAppear
PDFView
对象上使用此方法,它将在UIPageViewController中向您显示。
override func viewDidAppear(_animated: Bool) {
pdfView.usePageViewController(true, withViewOptions: nil)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.