[Category] //update states for data from Firebase depending on category[Category] //update states for data from Firebase depending on categorycollectionview.reloadData()
co
我使用的是集合视图,每次选择单元格时,我都会将单元格的背景颜色更改为红色。当我从左到右选择顶部的3个单元格时,背景颜色完全按照我的预期发生了变化:但是,如果我在选择单元格之后重新加载collectionView,那么选择顺序开始出现奇怪的行为。当我以从左到右的相同顺序选择相同的前3个单元格时,不同的单元格被选中:
override func collectionView(_ co
下面是UICollectionView所在的视图控制器的代码:import Firebaseimport FirebaseFirestoreimplementation, return the number of items }
}
override func collectionView(_ <em