Skip to content

Instantly share code, notes, and snippets.

@osmszk
Created January 30, 2014 08:58
Show Gist options
  • Save osmszk/8704893 to your computer and use it in GitHub Desktop.
Save osmszk/8704893 to your computer and use it in GitHub Desktop.
How to save UIImage as PNG
- (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