In what cases will I be sad? if I have set allowEditing
as false.
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
if let selectedImage = info[UIImagePickerControllerOriginalImage] as? UIImage {
// I am happy :)
} else {
// I am sad :(
}
dismiss(animated: true, completion: nil)
}
(I got a crash in iOS 11.2.1 iPhone SE
(as per Crashlytics
), so confused if there are legit conditions where this can fail or it is just an iOS bug.)
changed in IOS 12
image.image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage