Hi.
With ios 9 I load an image into my method cellForItemAt, asynchronously.
So the tricks to avoid image go in wrong cell is that :
if let cellToUpdate = collectionView.cellForItem(at: indexPath) as? ProductCollectionViewCell {
cellToUpdate.imageView?.image = image
}
But with the prefetching added in ios 10, when I scrool into my view down and up, some cell get any image. It's seems to cellForItem don't find any cell with my indexPath, like it don't exist...
If I deactivate prefetching, it's okay. If I remove this workaround. When cell load, some image get wrong place during 1 second
Any idea how get image in good place ?