Reputation: 343
I want to reload just one cell in a UICollectionView
.
I know in UITableView
it is something like this :
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPathOfYourCell, nil] withRowAnimation:UITableViewRowAnimationNone];
but what about UICollectionView
?
Upvotes: 6
Views: 9367
Reputation: 7944
Use the method called reloadItemsAtIndexPaths:
[self.collectionView reloadItemsAtIndexPaths:@[indexPathOfYourCell]];
Upvotes: 10
Reputation: 4474
For swift 4 use this code:-
self.collectionView.reloadItems(at: [indexPath!])
Upvotes: 2