I have a CollectionView
, I use the cells to display videos and I also store some other data on variables. And whenever I scroll I reuse previous cells using the following code:
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("profileCell", forIndexPath: indexPath) as! ProfileCollectionViewCell
But I noticed that when I am using an indexPath
I have previously used, I do not get back the same cell as previously but another cell apparently at a random order. I would like to avoid reloading the videos when it is not necessary.
Is there a way for me to get the same cell used with the same indexPath
?
Thanks, Carlos