简体   繁体   English

如何将所有照片从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". 要从iPhone照片库读取所有图像,请使用“资产库框架”。

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

There is a ALAssetsFilter called "allPhotos", you can use the filter with the setAssetsFilter: and the enumerateAssetsUsingBlock: methods in ALAssetsGroup to achieve this. 有一个名为“ allPhotos”的ALAssetsFilter,您可以将过滤器与ALAssetsGroup中的setAssetsFilter:和enumerateAssetsUsingBlock:方法一起使用。

Here is some sample code implementing this: http://www.icodeblog.com/2010/07/08/asset-libraries-and-blocks-in-ios-4/ 这是实现此目的的一些示例代码: http : //www.icodeblog.com/2010/07/08/asset-libraries-and-blocks-in-ios-4/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM