Reload UICollectionView header or footer?

前端 未结 10 1231
余生分开走
余生分开走 2020-12-08 02:35

I have some data that is fetched in another thread that updates a UICollectionView\'s header. However, I\'ve not found an efficient way of reloading a supplementary view suc

10条回答
  •  孤街浪徒
    2020-12-08 03:09

    let headerView = collectionView.visibleSupplementaryViews(ofKind: UICollectionView.elementKindSectionHeader)[0] as! UICollectionReusableView
    

    I've used above method to get current header, and successfully updated subviews on it.

提交回复
热议问题