假设 PDF 中只有一页。 我要实现的目标:保存当前正在查看的 PDFPage 的缩放和偏移量,并在用户返回该页面时以完全相同的偏移量和缩放级别显示页面。 我所取得的成就:计算偏移量和缩放并在页面重新加载时,成功显示保存的页面缩放级别。我无法设置偏移量。尝试使用以下方法,但没有效果。
1)
[_pdfView goToRect:rect onPage:[_pdfView.document pageAtIndex: page.unsignedLongValue ]];
2)
PDFDestination *destination = [_pdfView.currentDestination initWithPage:[_pdfView.document pageAtIndex: page.unsignedLongValue ] atPoint:viewPoint];
[_pdfView goToDestination:destination];