Kjuly / ALAssetsLibrary-CustomPhotoAlbum

A nice ALAssetsLibrary category for saving images & videos into custom photo album.
http://www.touch-code-magazine.com/ios5-saving-photos-in-custom-photo-album-category-for-download/
MIT License
405 stars 101 forks source link

loadPhotosFromAlbum not working #14

Closed likentong closed 10 years ago

likentong commented 10 years ago

Hi, i found out that the loadPhotosFromAlbum always return empty array. Anyway to fix it?

Kjuly commented 10 years ago

Sorry for my late reply. I checked that method and found that it's because of multiple threads issue. Now you can use the new method -loadImagesFromAlbum:completion:, where u can get a completion block to be executed when succeed or failed to load images from target album.

- (void)loadImagesFromAlbum:(NSString *)albumName
                 completion:(void (^)(NSMutableArray *images, NSError *error))completion;

And also, I offered a testing code snippet at PhotosTableViewController.m L80. You can comment it out to see the result. Hope this helps. ;)

likentong commented 10 years ago

Thanks, it works :)

Kjuly commented 10 years ago

You're welcome ;)