快速处理iOS上PDF查看器中的链接 [英] handle links clicking inside PDF viewer on iOS with swift

查看:124
本文介绍了快速处理iOS上PDF查看器中的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有PDF查看器的应用程序,该应用程序显示存在的PDF文件. 该文件具有链接,其中一些链接转到网站,而某些链接转到PDF本身内的其他页面.我使用PDFDocument,有什么方法可以处理对这些链接的点击?

I have an application with PDF viewer that show an existence PDF file. that file has links, some of these links go to websites, and some links go to another pages inside the PDF itself. I use PDFDocument, is there any way to handle the clicking on those links?

推荐答案

将PDFViewDelegate实施为PDFVIew. 委托点击链接时触发以下方法:

Implement PDFViewDelegate to PDFVIew. following method in delegate trigger on link click:

- (void)PDFViewWillClickOnLink:(PDFView *)sender withURL:(NSURL *)url

实施链接处理的逻辑.

这篇关于快速处理iOS上PDF查看器中的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆