我能够将我的文件数组保存在我的NSDocumentDirectory
. 这是我使用的:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [paths objectAtIndex:0];
NSString *savedImagePath = [documentsDir stringByAppendingPathComponent:[NSString stringWithFormat:@"Images%d.png", i]];
ALAssetRepresentation *rep = [[info objectAtIndex: i] defaultRepresentation];
UIImage *image = [UIImage imageWithCGImage:[rep fullResolutionImage]];
//NSData *imageData = UIImagePNGRepresentation(image);
[UIImageJPEGRepresentation(image, 1.0) writeToFile:savedImagePath atomically:YES];
我的问题是如何将这种格式的图像加载@"Images%d.png"
到这段代码中:
。H
@property (strong, nonatomic) NSMutableArray *images;
.m
self.images = ??????