开发者

QuickLook plugin displaying an image and some infos

I'm currently writing a QuickLook plugin, and I wondering how I can display an image and some information about that image at the same time, similar to http://w开发者_Go百科ww.code-line.com/software/sneakpeekphoto/ .


There is only one way to do so: Convert your content to an already supported one. This means either PDF or HTML. There are two options you have:

  1. For static information you create a simple PDF preview by rendering a view into a PDF. (Use -dataWithPDFInsideRect: method of NSView)
  2. For dynamic information create a HTML page with links and so on. QuickLook will then show it. (I think this is also the way your example does it.)

We have not found a way to create complex previews on ur own and had to stick to one of the methods, too. Keynote and Pages do the same -- they convert their presentations to multi-page PDF previews...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜