Skip to content

'originalImage' cannot be resolved without a contextual type #157

Description

@c930586

I'm trying to add this to my Swift app, but I keep getting an error:

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
if let selectedImage = info[.originalImage] as? UIImage {
imageView.image = selectedImage
} else {
print("Failed to retrieve the original image")
}
picker.dismiss(animated: true, completion: nil)
}

Error: Reference to member 'originalImage' cannot be resolved without a contextual type

Is this properly working with Swift 6?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions