Created
September 8, 2011 04:14
-
-
Save pius/1202596 to your computer and use it in GitHub Desktop.
Parse example
This file contains hidden or 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
// serialize the image and save it on the object | |
UIImage *small = [UIImage imageWithCGImage:image.CGImage scale:0.1 orientation:UIImageOrientationUp]; | |
NSData *imageData = UIImageJPEGRepresentation(small, .5); | |
[self.added setObject:imageData forKey:@"image"]; | |
// later ... | |
[self.added saveInBackground]; //unfortunately, this still blocks the main thread |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment