Open camera roll on an exact photo

女生的网名这么多〃 提交于 2019-12-22 08:22:58

问题


I'm developing a camera application where I'd like to put some functions that are already present in the stock app. My problem is replicating the little square in the bottom left corner (in portrait mode) where the micro-thumbnail of the photo that the user has just taken is shown; then, when the user tap on it, the photo app should open, on the last photo saved in the camera roll.

I can load the thumbnail of the newest photo in camera roll with ALAssetsLibrary - I've access to it with [UIImage imageWithCGImage:[result thumbnail]] - but even if I have its ALAsset URL, I can't open the photo app. I'm trying to do it with:

[[UIApplication sharedApplication] openURL:result.defaultRepresentation.url];

But nothing happens.

I could display it internally in my app, with an additional UIView, but I think will be simpler and... smarter to use the official photo app!

Can anyone help me? Thank you in advance!


回答1:


You may want to use the UIImagePickerController, as answered here: https://stackoverflow.com/a/11078182/883413



来源:https://stackoverflow.com/questions/7277292/open-camera-roll-on-an-exact-photo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!