我需要知道何时重新加载UICollectionView已经完成以便以后配置单元格(因为我不是单元格的数据源 - 其他明智的就是已经完成它...)
我试过像这样的代码
[self.collectionView reloadData];
[self configure cells]; // BOOM! cells are nil
Run Code Online (Sandbox Code Playgroud)
我也试过用
[self.collectionView performBatchUpdates:^{
[self.collectionView reloadData];
} completion:^(BOOL finished) {
// notify that completed and do the configuration now
}];
Run Code Online (Sandbox Code Playgroud)
但是当我重新加载数据时,我正在崩溃.
如何将数据重新加载到集合中,并且只有在完成重新加载后才能重新加载 - 执行特定的完成处理程序
objective-c-blocks completionhandler uicollectionview uicollectionviewcell