开发者

Hyperlinks not working in PDFView (in my cocoa app)

I have a PDFV开发者_C百科iew object in one of my windows and wondering if there's anything special I need to do in order for the hyperlinks to work.

The same pdf files have working hyperlinks when opened in other apps (like skim, preview, etc).

Any ideas?


Add a delegate to your PDFView that responds to this selector

- (void)PDFViewWillClickOnLink:(PDFView *)sender withURL:(NSURL *)url
{
   [[NSWorkspace sharedWorkspace] openURL:url];
}


Turned out that I simply had to enable this in my derived class: [super mouseDown:theEvent];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜