Order photo albums displayed by ALAssets library

I use the ALAssets library to create a custom image selection controller (as in the photo app). In particular, I use enumerateGroupsWithTypes to populate a list of albums so that I can put them in a table. I notice that when using this method, it fills the list in reverse order, like a photo application, so albums are displayed in reverse order. For instance:

The Photos application displays albums in this way: enter image description here

My application displays albums in this way: enter image description here

The obvious solution for me is to simply add albums to the beginning of my array, and not back, however, I wanted to know if this is normal behavior or is it a mistake? "Test Row" and "Test Row 2", which I created using the new option in ios5, which allows you to create your own album in the photo application, but I wonder if you add albums in other ways (for example, through iPhoto, which I'm not sure how to do it), are they ordered correctly? Has anyone come across this?

+4
source share
1 answer

It is not possible to change the order by which AssetsLibrary returns to the calling ALAssetsGroup s.

0
source

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


All Articles