我有一个CollectionView
,我使用单元格来显示视频,并且我还在变量上存储了一些其他数据。每当我滚动我重复使用下面的代码之前碎片:UICollectionViewCells deque返回错误的单元格
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("profileCell", forIndexPath: indexPath) as! ProfileCollectionViewCell
但我注意到,当我使用我先前使用过的indexPath
,我没有得到相同的细胞如以前,但另一个细胞显然在随机顺序。我想避免在没有必要时重新加载视频。
有没有办法让我用相同的indexPath
使用同一个单元?
感谢, 卡洛斯
可能重复的[UICollectionView - 图像随机设置](http://stackoverflow.com/questions/23013935/uicollectionview-image-is-getting-set-randomly) – casillas