From e446c3b6f289251cfaebdcad97a63e6473768d0b Mon Sep 17 00:00:00 2001 From: Kamalesh Palanisamy Date: Sat, 22 Feb 2020 13:57:28 +0530 Subject: [PATCH] Update ViewController to work on iOS 13 with Xcode 11.3 --- CoreMLDemo/ViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CoreMLDemo/ViewController.swift b/CoreMLDemo/ViewController.swift index a4f3e23..3d7058e 100644 --- a/CoreMLDemo/ViewController.swift +++ b/CoreMLDemo/ViewController.swift @@ -59,11 +59,11 @@ extension ViewController: UIImagePickerControllerDelegate { dismiss(animated: true, completion: nil) } - func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { + func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { picker.dismiss(animated: true) classifier.text = "Analyzing Image..." - guard let image = info["UIImagePickerControllerOriginalImage"] as? UIImage else { + guard let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage else { return } //1