刷新UICollectionview [英] Refreshing a UICollectionview

查看:389
本文介绍了刷新UICollectionview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道在显示集合视图时如何重新加载/刷新UICollectionView吗?基本上我正在为UITableview寻找类似于标准reloadData方法的东西。

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.

推荐答案

你可以打电话:

[self.myCollectionView reloadData];

个别部分和物品也可以重新加载:

Individual sections and items can also be reloaded:

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

这篇关于刷新UICollectionview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆