在确切的照片上打开相机胶卷 [英] Open camera roll on an exact photo

查看:161
本文介绍了在确切的照片上打开相机胶卷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个相机应用程序,我想放一些已经存在于股票应用程序的功能。我的问题是复制左下角的小方块(在纵向模式),其中显示用户刚刚拍摄的照片的微缩略图;

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.

我可以加载最新照片的缩略图相机卷ALAssetsLibrary - 我可以访问它 [UIImage imageWithCGImage:[result thumbnail]] - 但即使我有它的ALAsset URL,我无法打开照片应用程序。我试图这样做:

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];

但没有任何反应。

在我的应用程序内部显示它,有一个额外的UIView,但我认为会更简单,更聪明的使用官方照片应用程序!

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!

推荐答案

您可能想使用UIImagePickerController,如下所示:http://stackoverflow.com/a/11078182/883413

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

这篇关于在确切的照片上打开相机胶卷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆