如何将所有照片从iPhone照片库读取到应用程序中,我将如何获取照片库的路径? [英] How to read all images from iphone photo library into application and how i would i get path of photo library?

查看:64
本文介绍了如何将所有照片从iPhone照片库读取到应用程序中,我将如何获取照片库的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将iphone照片库中的所有图像读取到应用程序中,我将如何获取照片库的路径?

How to read all images from iphone photo library into application and how i would i get path of photo library??

推荐答案

要从iPhone照片库读取所有图像,请使用资产库框架".

To read all images from iPhone photo library, use the "assets library framework".

您可以在此处查看Apple的文档: http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/AssetsLibraryFramework/_index.html

You can check out Apple's documentation here: http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/AssetsLibraryFramework/_index.html

有一个名为"allPhotos"的ALAssetsFilter,您可以将过滤器与ALAssetsGroup中的setAssetsFilter:和enumerateAssetsUsingBlock:方法一起使用.

There is a ALAssetsFilter called "allPhotos", you can use the filter with the setAssetsFilter: and the enumerateAssetsUsingBlock: methods in ALAssetsGroup to achieve this.

以下是一些实现此目的的示例代码: http://www.icodeblog. com/2010/07/08/asset-libraries-and-blocks-in-ios-4/

Here is some sample code implementing this: http://www.icodeblog.com/2010/07/08/asset-libraries-and-blocks-in-ios-4/

这篇关于如何将所有照片从iPhone照片库读取到应用程序中,我将如何获取照片库的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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