解决UICollectionView 刷新闪烁
方法1:
[UIView animateWithDuration:0 animations:^{
[collectionView performBatchUpdates:^{
[collectionView reloadData];
} completion:nil];
}];
方法2:
[UIView setAnimationsEnabled:NO];
[self.collectionView performBatchUpdates:^{
__strong typeof(self) strongSelf = weakSelf;
if (strongSelf) {
[strongSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
}
} completion:^(BOOL finished) {
[UIView setAnimationsEnabled:YES];
}];