如何从UIViewController打开Photo应用程序?

时间:2021-11-13 13:03:40

I have some possible results for How to open Photo App from uiviewcontroller in button Action. It's like a Facebook authentication screen open, that means when user click uibutton, it will minimize the native app and open the photo app. Is this possible for both ios 6 and ios 7 versions.

我有一些可能的结果如何从按钮操作中的uiviewcontroller打开照片应用程序。它就像一个Facebook身份验证屏幕打开,这意味着当用户点击uibutton时,它将最小化本机应用程序并打开照片应用程序。这是ios 6和ios 7版本的可能吗?

Kindly give some possible results if you are know?

如果你知道的话,请给出一些可能的结果?

If any body give the solutions I really appreciate to you.

如果有任何机构给出解决方案我真的很感激你。

4 个解决方案

#1


9  

UIApplication.shared.open(URL(string:"photos-redirect://")!)

#2


4  

It is not possible. The Photos app does not register any URL schemes. This means you cannot open it by calling:

这不可能。照片应用程序不会注册任何URL方案。这意味着你无法通过调用打开它:

[[UIApplication sharedApplication] openURL:url];

and passing a valid URL (like you would to open Safari or Phone apps). Short answer is that you cannot open the Photos app programmatically.

并传递有效的URL(就像你打开Safari或手机应用程序一样)。简短的回答是你不能以编程方式打开照片应用程序。

Documentation: About Apple URL Schemes

文档:关于Apple URL Schemes

#3


-1  

you can not open default photo app ,if you want to select photo from photo album,check this: Load image from photo library

您无法打开默认照片应用程序,如果要从相册中选择照片,请选中此选项:从照片库中加载图像

#4


-2  

It is not possible to open the Picture app from your application.

无法从您的应用程序中打开Picture应用程序。

A list of all URL schemes can be found here, including third party applications.

可以在此处找到所有URL方案的列表,包括第三方应用程序。

-> iOS URL Schemes

- > iOS URL Schemes

#1


9  

UIApplication.shared.open(URL(string:"photos-redirect://")!)

#2


4  

It is not possible. The Photos app does not register any URL schemes. This means you cannot open it by calling:

这不可能。照片应用程序不会注册任何URL方案。这意味着你无法通过调用打开它:

[[UIApplication sharedApplication] openURL:url];

and passing a valid URL (like you would to open Safari or Phone apps). Short answer is that you cannot open the Photos app programmatically.

并传递有效的URL(就像你打开Safari或手机应用程序一样)。简短的回答是你不能以编程方式打开照片应用程序。

Documentation: About Apple URL Schemes

文档:关于Apple URL Schemes

#3


-1  

you can not open default photo app ,if you want to select photo from photo album,check this: Load image from photo library

您无法打开默认照片应用程序,如果要从相册中选择照片,请选中此选项:从照片库中加载图像

#4


-2  

It is not possible to open the Picture app from your application.

无法从您的应用程序中打开Picture应用程序。

A list of all URL schemes can be found here, including third party applications.

可以在此处找到所有URL方案的列表,包括第三方应用程序。

-> iOS URL Schemes

- > iOS URL Schemes