Getting image name of iphone photo library

后端 未结 2 935
死守一世寂寞
死守一世寂寞 2021-01-07 15:29

I\'m doing a project to take images from iphone photo library or in other way from camera roll. I have done that without any problem. But i need to retrieve the name from th

相关标签:
2条回答
  • 2021-01-07 15:41

    If you need the full path, just use this:

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

    This will leave the full URL of the image on your device as the Value member of the pathInfo object.

    0 讨论(0)
  • 2021-01-07 15:45

    Have a look at ALAssetsLibrary which is available in iOS 4.0 and later.

    Also, these links may help

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

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

    0 讨论(0)
提交回复
热议问题