Skip to content

Instantly share code, notes, and snippets.

@gali8
Created September 15, 2017 16:01
Show Gist options
  • Save gali8/27dc1fa4e947c3180d0944bd7f6853ed to your computer and use it in GitHub Desktop.
Save gali8/27dc1fa4e947c3180d0944bd7f6853ed to your computer and use it in GitHub Desktop.
//MARK: - UIImagePickerControllerDelegate
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
picker.dismiss(animated: true, completion: nil)
}
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
picker.dismiss(animated: true, completion: nil)
guard let image = info["UIImagePickerControllerOriginalImage"] as? UIImage else {
return
}
self.predictImage(image: image)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment