[UIView performWithoutAnimation:^{
[self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:4]];
}];
[UIView performWithoutAnimation:^{
[self.collectionView reloadData];
}];
本文介绍了如何使用UIView performWithoutAnimation方法来实现UICollectionView的指定位置或全部数据的平滑刷新效果,避免了因动画引起的视觉抖动。
[UIView performWithoutAnimation:^{
[self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:4]];
}];
[UIView performWithoutAnimation:^{
[self.collectionView reloadData];
}];
4221

被折叠的 条评论
为什么被折叠?