Last active
August 29, 2015 14:15
-
-
Save ericcgu/3f816db1e5b1f977c77f to your computer and use it in GitHub Desktop.
Parse Image Upload
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
let pickedImage:UIImage = "SOME IMAGE" | |
let scaledImage = scaleImageWith(pickedImage) | |
let imageData = UIImagePNGRepresentation(scaledImage) | |
let imageFile:PFFile = PFFile(data: imageData) | |
PFUser.currentUser().setObject(imageFile, forKey: "imageFieldName") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment