1:原文摘自:http://www.devdiv.com/thread-84543-1-1.html
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *baseImage = [info objectForKey:UIImagePickerControllerOriginalImage];
if (baseImage == nil) return;
compositeImage = [self addOverlayToBaseImage:baseImage];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSDate* date = [NSDate date];
NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"yyyyMMddHHMMSS"];
NSString* str = [formatter stringFromDate:date];
//给照片按拍摄时间命名
NSString *uniquePath=[[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",str]];
BOOL result=[UIImagePNGRepresentation(compositeImage)writeToFile: uniquePath atomically:YES];
if (result) {
NSLog(@"success");
}
}
请问如何把这些保存在沙盒中的图片全部读出来呢?并循环显示在一个uiimageview中呢?