Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refreshing a UICollectionview

Tags:

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.

like image 792
SNV7 Avatar asked Feb 07 '13 01:02

SNV7


People also ask

How do you refresh data in collection view?

reloadData() Reloads all of the data for the collection view.

What is the difference between UITableView and UICollectionView?

For the listing details of each item, people use UITableView because it shows more info on each item. The UICollectionView class manages an ordered collection of data items and presents them using customizable layouts.

What is a UICollectionView?

An object that manages an ordered collection of data items and presents them using customizable layouts.

What is the purpose of supplementary views when used with a UICollectionView?

Use Supplementary View to Add Header and Footer in UICollectionView.


1 Answers

You can just call:

[self.myCollectionView reloadData]; 

Individual sections and items can also be reloaded:

[self.myCollectionView reloadSections:indexSet]; [self.myCollectionView reloadItemsAtIndexPaths:arrayOfIndexPaths]; 
like image 139
Firo Avatar answered Oct 08 '22 05:10

Firo