如何获取存储在设备中的所有图像,并在iPhone sdk中将它们显示为图库 [英] How to get all the images stored in the device and show them as gallery in iPhone sdk

查看:85
本文介绍了如何获取存储在设备中的所有图像,并在iPhone sdk中将它们显示为图库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将所有图像存储在设备中,并在我的iPhone应用中将其显示为图库。 UIImagePickerController以缩略图视图显示所有照片,并且在选择每张照片时,我们只获取该特定所选图像的数据,而不想一次性获取所有照片并将其显示为图库。这是可能的,如果是,请告诉我如何做到这一点。 AssetLibrary有什么用?它是否对我需要实现的目标有所帮助。如果是,请告诉我如何使用AssetLibrary实现这一目标。

I want to get all the images stored in the device and show them as gallery in my iPhone app. UIImagePickerController shows all the photos in thumbnail view and on selecting each photo we get the data of that particular selected image only, instead i want to get all the photos at one shot and show them as gallery. Is this possible, if yes please tell me how to do this. What is the use of AssetLibrary ?. Does it help what I need to achieve.If yes, please tell me how to achieve this using AssetLibrary.

推荐答案

ALAssetsLibrary 提供对照片应用程序控制下的视频和照片的访问。

An instance of ALAssetsLibrary provides access to the videos and photos that are under the control of the Photos application.

该库包括Saved Photos相册中的那些,来自iTunes的那些以及直接导入设备的那些。您可以使用它来检索所有资产组的列表,并将图像和视频保存到已保存的照片相册中。

The library includes those that are in the Saved Photos album, those coming from iTunes, and those that were directly imported into the device. You use it to retrieve the list of all asset groups and to save images and videos into the Saved Photos album.

ELCImagePickerController 是一个让所有人获得的示例项目iPhone相册中的照片。

ELCImagePickerController is an Example project for getting all the photos in the iPhone Photo Album.

这篇关于如何获取存储在设备中的所有图像,并在iPhone sdk中将它们显示为图库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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