Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
c930586 opened this issue Nov 1, 2024 · 0 comments
Open

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

c930586 opened this issue Nov 1, 2024 · 0 comments

Comments

@c930586
Copy link

c930586 commented Nov 1, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant