iOS8 Photos Framework: How to get the name(or filename) of a PHAsset?

后端 未结 7 1105
野趣味
野趣味 2020-11-28 10:06

Im trying to get the image name using PHAssets. But I couldn\'t find metadata for filename or any method to get the image name. Is there a different way to get

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 10:41

    What you really looking for is the localIdentifier which is a unique string that persistently identifies the object.

    Use this string to find the object by using the:

    fetchAssetsWithLocalIdentifiers:options:, fetchAssetCollectionsWithLocalIdentifiers:options:, or fetchCollectionListsWithLocalIdentifiers:options: method.

    More information is available here

提交回复
热议问题