Skip to content

Instantly share code, notes, and snippets.

@pius
Created September 8, 2011 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pius/1202596 to your computer and use it in GitHub Desktop.
Save pius/1202596 to your computer and use it in GitHub Desktop.
Parse example
// 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