This here strangely solved it for me:
lazy var collectionView: UICollectionView = {
let collectionView = UICollectionView(/**/)
// ...
collectionView.register(HeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: HeaderView.reuseId)
collectionView.register(HeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: HeaderView.reuseId)
// ....
return collectionView
}()
And where I reuse the theader:
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: HeaderView.reuseId, for: indexPath) as! HeaderView
// ... update header with data
return header
}
In my collectionView I am only using headers. No footers at all.
Post
Replies
Boosts
Views
Activity
Bravo!
Turning off Bluetooth on my Apple watch solved it for me. Who needs Bluetooth in 2022 anyway?