在didFinishPickingMediaWithInfo中,let image = info[UIImagePickerControllerEditedImage] as! UIImage语句可以去到编辑好的图片
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
let image = info[UIImagePickerControllerEditedImage] as! UIImage
CURRENT_USER.curUserImage = UIImageJPEGRepresentation(image, 1)!
self.image.image = image
let imgFile = AVFile(name: "\(CURRENT_USER.curUserID)-\(NSDate()).jpg", data: UIImageJPEGRepresentation(image, 0.8))
imgFile.saveInBackground()
userInfo!["imageFile"] = imgFile
userInfo!.saveInBackgroundWithBlock { (isSucceed, err) -> Void in
if isSucceed{
print("保存成功")
}
if let err = err{
print(err.localizedDescription)
}
}
picker.dismissViewControllerAnimated(true, completion: nil)
}