I have an uicollectionview with supplementaryView for each section. In each supplementaryView I have some buttons. In dataSource method collectionView:viewForSupplementaryElementOfKind:atIndexPath: I'm setting the buttons tags with the indexPath.section. I made some delegate methods when a button is pressed and send the section(button.tag) as parameter.
Everything works fine, but here comes the problem:
I've tried:
Ohh.. And I use NSFetchedResultsController(delegate) for inserting and deleting sections.
Can anyone help me with this? Is there a way to reload only the supplementaryView? Is there other approach for this scenario?
Thank You!
To reload supplementary views you can use -invalidateLayoutWithContext:
.
See documentation for UICollectionViewLayoutInvalidationContext
and method -invalidateSupplementaryElementsOfKind:atIndexPaths:
(available since iOS 8).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With