I'm trying to add some more cells to an existing UICollectionView
, which is already filled with some cells.
I tried to use the CollectionView reloadData
but it seems to reload the entire collectionView and I just wanted to add more cells.
Can anybody help me?
The easiest way to insert new cells to the UICollectionView without having to reload all its cell is by using the performBatchUpdates, which can be done easily by following the steps below.
The
UICollectionView
class has methods to add/remove items. E.g., to insert an item at someindex
(in section0
), modify your model accordingly and then do:The view will do the rest.