这样写就会出问题
imageView.sd_setImage(with:URL(string: self.imageData[i] as! String), placeholderImage:defaultImage, completed: { (image, error, cacheType, imageURL)->() in })报错: Ambiguous use of ‘sd_setImage’
因为在Swift中要调有参数的方法:
imageView.sd_setImage(with: URL(string: self.imageData[i] as! String), placeholderImage: defaultImage, options: .retryFailed, completed: { (image, error, cacheType, imageURL) in })这样就ok了。。。。。。。。。。。。。。。。。。。。
新闻热点
疑难解答