I save in NSDocumentDirectory
this way:
NSLog(@"%@", [info objectAtIndex:i]);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]];//----resize the imagesimage = [self imageByScalingAndCroppingForSize:image toSize:CGSizeMake(256,256*image.size.height/image.size.width)];NSData *imageData = UIImagePNGRepresentation(image);[imageData writeToFile:savedImagePath atomically:YES];
I know how to delete all the images in NSDocumentDirectory
.
But I was wondering on how to delete all of the images with the name of oneSlotImages
.
Thanks