是否有可能将光电库视图实现为自定义缩略图视图,因为默认视图是网格列表。(例如,将其列出在uitableview中)您能帮帮我吗..我对此感到震惊过去一周...
Read about ALAssetsLibrary here is my code:
-(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);
}];
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.