简体   繁体   English

从应用程序快速打开图库

[英]Open gallery from app in swift

I wan't to let the user open the iPhone's gallery. 我不想让用户打开iPhone的图库。

I do NOT need the user to pick a photo nor a video and come back to my app, I am aware that i can achieve this using the UIImagePickerController . 不需要用户挑选照片也不是视频,回来我的应用程序,我知道我可以使用实现这个UIImagePickerController What I want is that the iOS gallery app is opened and set active. 我想要的是打开iOS画廊应用并将其设置为活动状态。

As said in this SO question , i know you can use other apps using UIApplication.shared.canOpenURL(url) with the correct url, does it exist a url that I can use for this or is there another method? 就像在这个SO问题中所说的,我知道您可以使用带有正确URL的UIApplication.shared.canOpenURL(url)使用其他应用程序,它是否存在可以用于此目的的URL或是否存在另一种方法? thanks!. 谢谢!。

I'm not sure what you mean by « gallery », but if what you're looking for is opening the Photos app, you may try with this URL: photos-redirect:// Be aware that this is not a publicly documented URL scheme so maybe Apple will not accept its use and may reject your app during review... 我不确定“画廊”是什么意思,但是如果您要查找的是打开“照片”应用,则可以尝试使用以下URL: photos-redirect://,请注意,这不是公开记录的URL计划,因此Apple可能不会接受其使用,并可能会在审核期间拒绝您的应用...

Sources: https://ios.gadgethacks.com/news/always-updated-list-ios-app-url-scheme-names-0184033/ and Is it possible to launch (redirect the user to) the native photo gallery application of iphone from my app, 来源: https : //ios.gadgethacks.com/news/always-updated-list-ios-app-url-scheme-names-0184033/以及是否可以启动(将用户重定向到)本机照相馆应用程序我的应用程式中的iphone,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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