Refreshing a UICollectionview

前端 未结 3 2142
陌清茗
陌清茗 2021-02-18 14:53

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 m

3条回答
  •  面向向阳花
    2021-02-18 15:19

    You can just call:

    [self.myCollectionView reloadData];
    

    Individual sections and items can also be reloaded:

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

提交回复
热议问题