我使用帶有SDWebImage的CocoaPods(3.8.2)和一個新的Swift 3項目(XCode版本8.2.1(8C1002))和下面的代碼UICollectionViewController內編譯罰款:iOS:Swift:SDWebImage:cell.customImageView.sd_setImage(with:imageURL)崩潰
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
...
cell.customImageView.sd_setImage(with: imageURL, completed:{
(SDWebImageCompletionBlock) in
})
...
}
我已經在迅速文件的頂級進口SDWebImage。 customImageView是一個自定義UICollectionViewCell
@IBOutlet weak var customImageView: UIImageView!
但是這崩潰上運行並出現以下錯誤中定義一個UIImageView:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView sd_setImageWithURL:completed:]: unrecognized selector sent to instance ...'
任何想法,爲什麼這是編譯好的,但在運行時崩潰?
的最新版本是V-4.0.2.beta,使用最新版本。 – aircraft