Which is even more weird is that it actually calls in to this block with the right data, I and the label colour is set to red, but the UI doesn't update 🤷♂️ could you explain please?
swift
dataSource = UICollectionViewDiffableDataSourceSection, Month(collectionView: collectionView) { (collectionView: UICollectionView, indexPath: IndexPath, item: Month) - UICollectionViewCell? in
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "monthcell", for: indexPath) as! MonthCollectionViewCell
cell.label.text = item.name
cell.label.textColor = item.isSelected ? .systemRed : .systemBlue
return cell
}
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: