“The consumer portion of Quick Look
has three components: a document
reader (consisting of a custom vIEw
and panel),display bundles for that
reader,and an SPI to enable
communication with the clIEnt. Each of
these components has a specific role
to play in support of the consumer:document reader—Quick Look implements
a vIEw (NSVIEw) and panel (NSPanel)
customized for displaying document
prevIEws. Along with the prevIEw
content,the vIEw might include (at
the clIEnt’s option) controls for
manipulating the prevIEw,such as
page-forward,page-backward,start
playing,rewind,and text-search. A
clIEnt application can embed this vIEw
in its user interface if it chooses.
The Quick Look panel contains a Quick
Look vIEw and varIoUs controls that
let the user take some action with the
prevIEw,such making the prevIEw image
full-screen or starting a slIDeshow.”
我一直在研究quicklook的所有文档和示例,我也看不到:
>任何类型的“文档阅读器”组件的定义或访问它的方式.
>任何类型的SPI都将显示消费者如何快速查看
>可以直接访问quicklook使用的NSVIEw来显示预览.
我想做的就是文档所说的:在我自己的层次结构中嵌入quicklook的视图,而不是在Panel中.该小组当然有丰富的文档.以前有没有人以这种方式成功使用过Quicklook?
解决方法 您正在寻找的课程是QLPrevIEwVIEw,它是Quartz.framework的一部分.这是一个公共课(我相信在lion中引入).不幸的是,文档团队显然尚未发布其文档,这可能是您无法找到它的原因. official docs现已上市.短而短的版本是您以任何其他视图的方式创建它,并将其prevIEwItem设置为ID< QLPrevIEwItem>你提供的. < QLPrevIEwItem>议定书is documented.例如
QLPrevIEwVIEw *pv = [[QLPrevIEwVIEw alloc] initWithFrame:frame style:QLPrevIEwVIEwStylenormal];[pv setPrevIEwItem:item];[myVIEw addSubvIEw:pv];[pv release];
这是YMMV的基本概念.
它的 *** 作在2011年WWDC会议“Mac OS X和iOS上的系统范围预览”(或类似的东西)中得到了全面介绍.如果您是Mac OS X或iOS开发人员计划的付费会员,您应该能够获得该视频.
总结以上是内存溢出为你收集整理的objective-c – Quicklook嵌入式预览全部内容,希望文章能够帮你解决objective-c – Quicklook嵌入式预览所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)