這樣寫就會出問題
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了。。。。。。。。。。。。。。。。。。。。
新聞熱點
疑難解答