Ambigious use of subscript compiler error : function below is for ELCImagePicker to pick multiple images and I added my code to, the code used to run probably and suddenly after installing Parse SDK it gave error "Ambigious use of subscript" at this line of code :
if let image = item[UIImagePickerControllerOriginalImage] as? UIImage

Code:
    
    func elcImagePickerController(_ picker: ELCImagePickerController!, didFinishPickingMediaWithInfo info: [Any]!) {
        
       self.dismiss(animated: true, completion: nil)
       var i = 0
        var z = 0
        
             var imageViews = [Any]() // array of any object used to save the selected imagesviews to it so we can display it on the viewcontroller
              for item in info as [AnyObject]
                 {
                    z += 0 //we used z = +0 as the arrays always starts at index 0 not 1
                    i += 1  //we used another var i += 1 as UIImagePickerControllerOriginalImage starts at 1

                    if let image = item[UIImagePickerControllerOriginalImage] as? UIImage
                    {
                        imagearray.insert(image, at: z) // array of images to be used in "Saved" function below to save the images selected to core data
               
                        image_view = UIImageView(image: image)
                       
                        let currentImageView = UIImageView(frame: CGRect(x: 130 + (i * 10), y: 50 + (i * 5), width: 50, height: 100))
                        currentImageView.contentMode = .scaleAspectFit
                        currentImageView.image = image_view.image
                        imageViews.append(currentImageView)
                    }
        }
         var y = 0
        var imageview: AnyObject
        for _ in imageViews as [Any] {
            imageview = imageViews[y] as AnyObject
            view.addSubview(imageview as! UIView)
            y += 1
        }
        
      
        }
    
