There are two local albums: Camera Film and Photo Gallery. The latter is generated through synchronization.
Dispatch_async (dispatch_get_main_queue (), ^ {[_ assetsLibrary partition: ALAssetsGroupAll usingBlock: ^ (ALAssetsGroup * group, BOOL * stop) {if (group) {[self. groupArray addObject: group]; [self generated mselecw.mainthread: @ selector (reloadTableView) withObject: nil waitUntilDone: YES] ;}} failureBlock: ^ (NSError * error) {NSLog (@ "Group not found! N "); self. title = @" failed to access the Photo "; // Photo-access is disabled.}];});
Count the number of albums by enumerating the groups of the ALAssetsGroupAll type. The result is only one.
I am confused because I am using the All option. After pondering for a long time, I finally found the reason in a detail: I think Line 44 is awkward. Why should I leave a blank Line, I couldn't help but habitually Delete this line-it turns out this is a library file. So I went back to Line 44 and looked at it: there was a Line break comment behind it, and the words like "exception" and "not" shook me -- the original ALAssetsGroupLibrary was not included!