Вы можете перейти к выбору, найденному с помощью текстового поиска в документе:
let selections = pdfView.document!.findString("have a pdf document", withOptions: [NSString.CompareOptions.literal])
guard let newSelection = selections.first else {
fatalError("selection not found.")
}
update(pdfView) {
$0.setCurrentSelection(newSelection, animate: true)
$0.scrollSelectionToVisible(nil)
}
Или вы можете перейти к cgRect на странице:
let pdfPage = pdfView.document!.page(at: 0)!
pdfView.go(to: cgRect, on: pdfPage)