I am willing to order my results by day so that the oldest photos are displayed on top.
I am currently fetching photos using the PHAsset fetchAssetsWithMediaType:
@property PHFetchResult *photos;
self.photos = [PHAsset fetchAssetsWithMediaType:PHAssetMediaTypeImage options:nil];
Ideally I want the results ordered by day, oldest photos first. Like this:
[11 Dec]
Photo #20 with creation time 17:00
Photo #21 with creation time 18:30
Photo #22 with creation time 19:00
Photo #23 with creation time 20:40
Photo #24 with creation time 21:00
[10 Dec]
Photo #16 with creation time 10:30
Photo #17 with creation time 11:00
Photo #18 with creation time 12:20
Photo #19 with creation time 13:00
[9 Dec]
Photo #14 with creation time 16:30
Photo #15 with creation time 17:00
I have seen I can pass a PHFetchOptions object with a predicate and some sort descriptors ( https://developer.apple.com/reference/photos/phfetchoptions ), can you suggest me how to specify them (I believe I should sort them using the creationDate attribute) so that I'll get the desired order?