Last active
November 24, 2016 11:32
-
-
Save jayeshk/0ac339b5eb2a789e1d0d7cf2ff09d849 to your computer and use it in GitHub Desktop.
AssetsLibrary print list of assets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init]; | |
[assetLibrary enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:^(ALAssetsGroup *group, BOOL *stop) { | |
if (group != NULL) { | |
[group enumerateAssetsUsingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) { | |
NSLog(@"asset: %@", result); | |
}]; | |
} | |
} failureBlock:^(NSError *error) { | |
NSLog(@"Error -- %@", error); | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment