2014-02-12 80 views

回答

3

的方法,我已经采取前:

ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; 

[library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) { 

[group setAssetsFilter:[ALAssetsFilter allPhotos]]; 

[group enumerateAssetsWithOptions:NSEnumerationReverse usingBlock:^(ALAsset *alAsset, NSUInteger index, BOOL *innerStop) { 

    if (alAsset) { 
     ALAssetRepresentation *representation = [alAsset defaultRepresentation]; 
     UIImage *latestPhoto = [UIImage imageWithCGImage:[representation fullScreenImage]]; 

     *stop = YES; *innerStop = YES; 

    } 
}]; 
} failureBlock: ^(NSError *error) { 
NSLog(@"Error : %@", [error localisedDescription]); 
}]; 
相关问题