I am just update xcode(10.0) after update i was update as well as swift language version(4.2) but middle in progress of updatation swift language give me some error i really confused how to solve this:
Error:
Cannot subscript a value of type '[String : Any]' with an index of type 'UIImagePickerController.InfoKey'
@objc(imagePickerController:didFinishPickingMediaWithInfo:) func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo Info: [String: Any]){
let mediatype = Info[UIImagePickerControllerMediaType] as! NSString
if mediatype.isEqual(to: kUTTypeImage as String) {
let imagecopy = Info[UIImagePickerControllerOriginalImage] as! UIImage
profileImage.image = imagecopy
if newpic == true {
UIImageWriteToSavedPhotosAlbum(imagecopy, self, #selector(imageError),nil)
}
}
self.dismiss(animated:true,completion:nil)
onlyUploadImage()
}
Error Screen Shot
Can someone please explain to me how to solve this , i've tried to solve this issue but no results yet.
Thank you