目前我正在执行以下操作来迭代 NSMutableIndexSet:
if ([indexSet isNotNull] && [indexSet count] > 0){
__weak PNRHighlightViewController *weakSelf = self;
[indexSet enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
if ([[self.highlightedItems_ objectAtIndex:idx] isNotNull]){
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:idx inSection: [weakSelf.collectionView numberOfSections]-1];
[weakSelf.collectionView reloadItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
}
}];
}
我想生成一个 NSIndexPath 数组,然后在这些索引路径处重新加载整个 collectionView。所以基本上我想在块完成后调用重新加载。我该怎么做?