How can I get an image created by a date date or last modified time date from iOS photos (like a camera roll)?

I am a new guy for iOS. Recently, I have been developing an iOS application for checking the image (in iOS Photos ) of the creation time of the date and the time of changing the date to sort these images by time. I used ALAssetsLibrary to list all the images, I can get the following attributes of each image: the name of the image file, the URL of the image resource (inside it I can get the extension of the image file and a unique resource identifier). But can anyone tell me how to get the image file created by date and last modified time time?

Thank you very much.

+4
source share
1 answer

You can get the asset creation date using the ALAssetPropertyDate property:

ALAsset* asset; ... NSDate* date = [asset valueForProperty:ALAssetPropertyDate]; 

I am not sure about the method of getting the last modified date.

+9
source

Source: https://habr.com/ru/post/977784/


All Articles