我有一個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