我的iphone应用程序有一个数组,用于存储用户表单库选择的图像路径.我想使用ALAssetsLibrary将数组中的所有图像路径转换为uiimage.我该怎么做?我尝试使用循环,但不能.谢谢你的帮助.
ALAssetsLibrary *library = [[[ALAssetsLibrary alloc] init] autorelease];
[library assetForURL:[filePath objectAtIndex:0] resultBlock:^(ALAsset *asset) {
UIImage *image = [UIImage imageWithCGImage:[[asset defaultRepresentation] fullResolutionImage]];
[fileImage addObject:image];
} failureBlock:^(NSError *error) {
}];
Run Code Online (Sandbox Code Playgroud)