How to get image from UIImagePickerController and Pass to next VC

后端 未结 6 1961
心在旅途
心在旅途 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:04

    For Swift 4.2

    use following

    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
        let image = info[UIImagePickerController.InfoKey.originalImage] as! UIImage
    
    }
    

提交回复
热议问题