use Photos Framework
@property(nonatomic , strong) PHFetchResult *assetsFetchResults; NSMutableArray *array; PHFetchOptions *fetchOptions = [[PHFetchOptions alloc] init]; fetchOptions.predicate = [NSPredicate predicateWithFormat:@"title = %@", @"Custom Photo Album"]; collection = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAny options:fetchOptions].firstObject; _assetsFetchResults = [PHAsset fetchAssetsInAssetCollection:collection options:nil];
Use the code above and put your album name, the data of which you want to receive in the place "Custom photo album"
PHFetchResult *collectionResult = [PHAsset fetchAssetsInAssetCollection:collection options:nil]; for (int h=0; h<[collectionResult count]; h++) { PHAsset *asset1 = collectionResult[h]; [_imageManager requestImageForAsset:asset1 targetSize:frame.size contentMode:PHImageContentModeAspectFill options:nil resultHandler:^(UIImage *result, NSDictionary *info) { [array2 addObject:result]; }]; } NSLog(@"array count%lu",(unsigned long)[array2 count]);
and use the array wherever you want to display all the album images
source share