I’m using
[assetsLibrary enumerateGroupsWithTypes:groupTypes usingBlock:listGroupBlock failureBlock:failureBlock];
to enumerate Photo Albums.
The enumerator is acting in an “asynchronous” way, in other words the methods returns before enumerating all items.
How can I know when the enumeration is finished?
I’m populating a NSMutableArray with the groups, and would to call [myTableView reloadData] after enumeration is finished.
Your enumeration will give your block a nil-pointer group and set stop to true when it goes through its last pass. You can use this to set a flag or call some finishing code using performSelectorOnMainThread: on the next pass through the RunLoop.