Skip to content

Instantly share code, notes, and snippets.

@brettfazio
Created May 19, 2020 15:52
Show Gist options
  • Select an option

  • Save brettfazio/23b3f452be641a25c5e85a4fc391713e to your computer and use it in GitHub Desktop.

Select an option

Save brettfazio/23b3f452be641a25c5e85a4fc391713e to your computer and use it in GitHub Desktop.
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
self.imagePicker.dismiss(animated: true)
guard let image = info[.editedImage] as? UIImage else {
print("No image found.")
return
}
// At this point we know we have an image.
// Print out the scale and size as a test:
print("\(image.scale) \(image.size)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment