Picker Error Message on Exit (encountered while discovering extensions: Error Domain=PlugInKit Code=13) With Swift 4 - Xcode 9

前端 未结 10 1165
生来不讨喜
生来不讨喜 2021-01-31 10:04

Similar to

PhotoPicker discovery error: Error Domain=PlugInKit Code=13

and also to

https://forums.developer.apple.com/thread/82105

BUT I have t

10条回答
  •  一个人的身影
    2021-01-31 10:53

    Can you try it out ?

    extension YourProfileViewController: UIImagePickerControllerDelegate, UINavigationControllerDelegate {
    
        func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
            dismiss(animated: true, completion: nil)
        }
    
        func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
            log.debug("Called imagePickerController function ")
            let image = info[UIImagePickerControllerOriginalImage] as? UIImage
            self.dismiss(animated: true) {
                self.yourProfileImageView.image = image
            }
        }
    }
    

提交回复
热议问题