简体   繁体   中英

Image Grabbing with iOS Share Extension

如何检查应用程序或页面上是否有要抓取的图像,然后使用SWIFT从iOS共享扩展程序中抓取图像以供以后使用?

You are thinking about this backwards, iOS will do that for you. All you can/have to do is define what you accept, see and keep in mind that by default all documents you accept have to be present at once or the share won't show up NSExtensionActivationRule

you can determine this using the ExtensionPreprocessingJS, in the run function

run: function(arguments) {
   arguments.completionFunction({"numberImages" : document.images.length});
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM