I'm trying to reload only data section, not header or footer (supplementary view), of UICollectionView.
When I use reloadData
method, header and footer section also reloads, so that's what I want.
I found the method reloadSections:
, but I don't know why it doesn't work.
Because my collection view only contains one section, so I tried using the method like this:
[collectionViewController.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
But it makes runtime error when the method is called. The content of error is:
'NSInvalidArgumentException', reason: '-[UICollectionViewUpdateItem action]:
unrecognized selector sent to instance 0x90aec00'
Is the method reloadSections:
is not allowed to use like this? Is there any alternative way to reload only data section, not header or footer section?