I have a controller implement with UICollectionView, and it has two sections. The section datas is fetch from two different API, and the return order is unknown.
When the first section data is returned, I call reloadSections to update first sections' cell. When the second section data is returned, I call reloadData to update whole cells(including the first section and the second section)
But if i call reloadData before reloadSections, the cell update correctly. When calling reloadSections before reloadData, the items count in second section is correct, but the cell shows the duplicate content, not the new content.
I have write a demo project and insert new data to second section, call reloadData, insert new data to first section. the collection view can also work correctly.
It just not works when i call reloadSections:FirstSection, then calling reloadData.
The Demo project can be find here: https://github.com/6david9/ReloadData/blob/master/ReloadData/ReloadData/ViewController.m
p.s. When i call reloadSections for each section update, the result is correct!
p.s. When i call reloadSections for the first section, it reload all the cells in first section. But after then, i call reloadData it only calls cellForItem for the last item in second section, which i add new item to the front of the second section. so it show duplication content of the last item previous was the last one.