I want the list of video that are stored in particular Album like that(VideoMaker) . This list is in array of URL.
- This list show in uicollectionview
I write this code..for to retrieve the video but it gives null value of URL.
[_library enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:^(ALAssetsGroup *group, BOOL *stop){
NSLog(@"succed");
if (group != NULL) {
[group enumerateAssetsUsingBlock:^(ALAsset *result, NSUInteger index,BOOL *st){
if ([[result valueForProperty:ALAssetPropertyType] isEqualToString:ALAssetTypeVideo]) {
NSLog(@"asset: %@", result);
[assets addObject:result];
}
}];
}
[self.collectionView reloadData];
} failureBlock:^(NSError *error) {
NSLog(@"Failure");
}];
In this code _library is(ALAssetLibrary) and assets is(NSMutableArray) I created one Album in my Iphone so I want get only this video that is stored in my Album.
I add the assetfilter in this. with the propertyname
The new code is: