获取iphone照片库的图像名称

时间:2012-03-20 10:21:01

标签: iphone ios ios4 ios5

我正在做一个项目,从iphone照片库或其他方式从相机胶卷拍摄图像。我没有遇到任何问题。但我需要从照片库中检索名称。有没有办法做到这一点?任何帮助表示赞赏

由于

2 个答案:

答案 0 :(得分:1)

查看iOS 4.0及更高版本中提供的ALAssetsLibrary。

此外,这些链接可能有所帮助

How to get a photo's original filename in iOS?

iPhone: How do I get the file path of an image saved with UIImageWriteToSavedPhotosAlbum()?

答案 1 :(得分:1)

如果您需要完整路径,请使用:

ALAsset* asset;   // previously assigned
NSDictionary* pathInfo = [asset valueForProperty:ALAssetPropertyURLs];

这会将设备上的图像的完整URL保留为pathInfo对象的Value成员。