I trying to have override the imagePickerController function that is in the UIImagePickerControllerDelegate. However, i seem to be getting an error :
Ambiguous reference to member 'subscript'
I have done multiple google searches and this seems to be working fine for everyone else?
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]){
myImageView.image = info[UIImagePickerControllerOriginalImage] as? UIImage
self.dismiss(animated: true, completion: nil)
}
Any help would be much appreciated. Thank you
You have the wrong signature for the delegate method. It should be:
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With