当我使用Apple的PDFKit中的PDFView时,我想检测pdf文档中链接的点击,但是在PDFView对象的委托上未调用PDFViewWillClickOnLink方法。 PDFView类是否损坏或我缺少什么?
PDFDocument *doc = [[PDFDocument alloc] initWithURL:self.pdfDocumentUrl];
PDFPage *page = [doc pageAtIndex:self.pageNumber];
[self.pdfView setDisplayDirection:kPDFDisplayDirectionHorizontal];
self.pdfView.displayMode = kPDFDisplaySinglePage;
[self.pdfView setDocument:doc];
[self.pdfView setEnableDataDetectors:YES];
[self.pdfView goToPage:page];
[self.pdfView setMaxScaleFactor:16.0];
[self.pdfView setAutoScales:YES];
self.pdfView.document.delegate = self;
[self.pdfView setDelegate:self];