Created
January 30, 2014 08:58
-
-
Save osmszk/8704893 to your computer and use it in GitHub Desktop.
How to save UIImage as PNG
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
- (void)saveImageFile | |
{ | |
NSData *data = UIImagePNGRepresentation(uiimage); | |
NSString *filePath = [NSString stringWithFormat:@"%@/sample.png" ,[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]]; | |
[data writeToFile:filePath atomically:YES]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment