Created
March 6, 2015 12:36
-
-
Save alekseypotapov-dev/691d8f900e257862a70d to your computer and use it in GitHub Desktop.
Save image to Documents folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; | |
NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent: | |
[NSString stringWithFormat:@"savedImage%lu.png",arrayOfImages.count]]; | |
NSData *imageData = UIImagePNGRepresentation(imageObject); | |
[imageData writeToFile:savedImagePath atomically:NO]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment