How to get the edited image from UIImagePickerController in Swift?

前端 未结 5 600
北荒
北荒 2021-02-09 03:11

I have seen and read the documents of Apple where they have clearly mentioned about the key UIImagePickerControllerEditedImage. But when I am running my following code, I am no

5条回答
  •  走了就别回头了
    2021-02-09 03:31

    You can do it like this.

    func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) {
    
        let image = info[UIImagePickerControllerEditedImage] as UIImage
    }
    

提交回复
热议问题