iOS共享扩展程序kUTTypeMovie获取缩略图 [英] iOS Share Extension kUTTypeMovie get thumbnail
问题描述
嘿,使用共享扩展程序共享照片中的视频时遇到麻烦.我的问题是我想获取缩略图& 照片"应用托管的我的共享扩展程序中视频的大小. 任何帮助都是感激的,在此先感谢您.
Hey there i am having trouble while sharing video from photos using my share extension. My problem is that i wanted to get the thumbnail & size of the video in my share extension hosted by Photos app. Any help is appreciable, thanks in advance.
推荐答案
Share Extension的UIViewController具有一个属性:
UIViewController of Share Extension have a property:
NSExtensionContext *extensionContext;
NSExtensionContext具有一个属性:
NSExtensionContext have a property:
NSArray *inputItems;
其中有一个NSExtensionItem类的索引为0的对象
Which have a 0-indexed object of NSExtensionItem class
接下来,NSExtension Item具有一个属性:
Next, NSExtension Item have a property:
NSArray *attachments;
这是NSItemProvider类的对象数组,现在是时候阅读一些 NSItemProvider类的文档
Which is an array of objects of NSItemProvider class, and now it is time to go to read some documentation for NSItemProvider class
这篇关于iOS共享扩展程序kUTTypeMovie获取缩略图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!