我需要知道何时重新加载 UICollectionView 以在之后配置单元格(因为我不是单元格的数据源 - 否则已经完成了......)
我试过代码,比如
[self.collectionView reloadData];
[self configure cells]; // BOOM! cells are nil
我也尝试过使用
[self.collectionView performBatchUpdates:^{
[self.collectionView reloadData];
} completion:^(BOOL finished) {
// notify that completed and do the configuration now
}];
但是当我重新加载数据时,我会崩溃。
如何将数据重新加载到集合中,并且仅在完成重新加载后 - 执行特定的完成处理程序