Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSString* imageName =
- [NSString stringWithFormat:@"image-%d.png", 1];
- NSString* pngPath = [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Documents/%@",imageName]];
- [UIImagePNGRepresentation(image) writeToFile:pngPath atomically:YES];
- NSError *error;
- NSFileManager* fileMgr = [NSFileManager defaultManager];
- NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
- NSLog(@"Documents directory: %@", [fileMgr contentsOfDirectoryAtPath:documentsDirectory error:&error]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement