How to load image asynchronously with Swift using UIImageViewExtension and preventing duplicate images or wrong Images loaded to cells
问题 Im developing an image loading library in Swift 4 something like Kingfisher with some extensions to support loading images from URL into an UIImageView . So then i can use this extension on a UICollection or UITableview cell with an UIImageView like this : let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectioncell", for: indexPath) if let normal = cell as? CollectionViewCell { normal.imagview.loadImage(fromURL:imageURLstrings[indexPath.row]) } Basically this is my