How to get image from UIImagePickerController and Pass to next VC

后端 未结 6 2007
心在旅途
心在旅途 2021-01-15 22:41

I select a photo from PhotoLibrary and How can I achieve below tasks

In this case, I am using Swift. I need to reconstruct the image in the next VC either thru :

6条回答
  •  孤独总比滥情好
    2021-01-15 23:14

        picker.dismissViewControllerAnimated(true, completion: { () -> Void in
                    let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage
    
         // Convert image to data and Send data anotherViewController 
    
           image data 
    
          UIImageJPEGRepresentation(self.pickedImage, 0.5)
                })
    

提交回复
热议问题