解决UICollectionView ReloadData闪一下
参考: https://www.cnblogs.com/Rinpe/p/5850238.html
- 在更新期间关闭动画
[UIView setAnimationsEnabled:NO];
[collectionView performBatchUpdates:^{
[collectionView reloadData];
} completion:^(BOOL finished) {
[UIView setAnimationsEnabled:YES];
}];
2.将更新动画时间设置为0 (已验证)
[UIView animateWithDuration:0 animations:^{
[collectionView performBatchUpdates:^{
[collectionView reloadData];
} completion:nil];
}];