是否可以将自动缩略图视图实现到自定义缩略图视图,因为默认视图是网格列表..(例如,在uitableview中列出它)你可以帮我解决..我受到了打击过去一周这个......
答案 0 :(得分:1)
了解ALAssetsLibrary 这是我的代码:
-(void)viewDidLoad{
void (^assetEnumerator)(struct ALAsset *, NSUInteger, BOOL *) = ^(ALAsset *result, NSUInteger index, BOOL *stop) {
if(result != NULL) {
//Add result to your array for UITableView
}
};
void (^assetGroupEnumerator)(struct ALAssetsGroup *, BOOL *) = ^(ALAssetsGroup *group, BOOL *stop) {
if(group != nil) {
[group enumerateAssetsUsingBlock:assetEnumerator];
}
};
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library enumerateGroupsWithTypes: ALAssetsGroupSavedPhotos
usingBlock: assetGroupEnumerator
failureBlock: ^(NSError *error) {
NSLog(@"Failure: %@", error);
}];
}