Refreshing a UICollectionview

SNV7 picture SNV7 · Feb 7, 2013 · Viewed 40.3k times · Source

Does anyone know how to reload/refresh a UICollectionView while the collection view is being displayed? Basically I'm looking for something similar to the standard reloadData method for a UITableview.

Answer

Firo picture Firo · Feb 7, 2013

You can just call:

[self.myCollectionView reloadData];

Individual sections and items can also be reloaded:

[self.myCollectionView reloadSections:indexSet];
[self.myCollectionView reloadItemsAtIndexPaths:arrayOfIndexPaths];