Advertisement
jdriselvato

imageCoreData

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