I am trying to reload only footer of collectionView of specific section for chat Application to show updated time. But unfortunately I ended up reloading whole Section using below code:
But above code can take long time to load particular section if we have long chat. Please help me out.
Code Block Swift let sections = self.collectionView.numberOfSections let indexSet = IndexSet(integer: sections-1) self.collectionView.reloadSections(indexSet)
But above code can take long time to load particular section if we have long chat. Please help me out.
You could probably use:
kind being
See other options here:
https://stackoverflow.com/questions/26998761/uicollectionview-is-there-a-way-to-reload-only-the-supplementary-views
Code Block func invalidateSupplementaryElements(ofKind elementKind: String, at indexPaths: [IndexPath])
kind being
Code Block kind = UICollectionElementKindSectionFooter
See other options here:
https://stackoverflow.com/questions/26998761/uicollectionview-is-there-a-way-to-reload-only-the-supplementary-views