0
这只会返回照片中的部分相册,我收到的相册不包含相同数量的资产,因为照片应用中存在相应的图片。获取来自ALAssetsLibrary的所有照片
NSMutableArray *groups = [[NSMutableArray alloc] init];
ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];
[assetLibrary enumerateGroupsWithTypes:ALAssetsGroupAll
usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
if (group) {
[group setAssetsFilter:[ALAssetsFilter allPhotos]];
[groups addObject:group];
} else {
block([groups copy], nil);
}
}
failureBlock:^(NSError *error) {
block(nil, error);
}];
我需要做些什么来获得所有1000个?
您可以尝试使用PHAsset照片和AVFoundation库。我使用PHAsset并访问所有图像,但我的代码在swift2.0 –
可能的重复[如何从我的库中以日期顺序在所有相册中获取我的alassets?](http://stackoverflow.com/questions/11622389/how-can-i-get-my-alassets-from-my-library-in-date-order-across-all-photo-albums) – techloverr