代码:
if let path = Bundle.main.path(forResource: "test", ofType: "pdf") {
let url = URL(fileURLWithPath: path)
if let pdfDocument = PDFDocument(url: url) {
pdfView.displayMode = .singlePage
pdfView.autoScales = true
pdfView.displayDirection = .horizontal
pdfView.document = pdfDocument
}
}
我尝试在应用程序中显示 pdf 文件。它工作正常。如何实现水平滚动(逐页)和搜索功能(如突出显示搜索词)功能。任何帮助都将得到应用。提前感谢