zvonicek / ImageSlideshow

Swift image slideshow with circular scrolling, timer and full screen viewer
MIT License
1.77k stars 475 forks source link

Type of expression is ambiguous without more context #421

Open bbehradd opened 3 years ago

bbehradd commented 3 years ago

when using AlamofireSource(urlString: "imageURL") inside setImageInputs function, i'm getting this error: Type of expression is ambiguous without more context but when i'm using ImageSource(image: UIImage(named: "imageName")!) the error is gone. this error also happening for KingfisherSource(urlString: "imageURL")

asad175 commented 2 years ago

KingfisherSource(urlString: "imageURL") gives an optional object, just do its force unwrapping then it will be fine, like this.

slideShow.setImageInputs([
            KingfisherSource(urlString: "imageURL")!
        ])