我有一个 UICollectionView 包含 10 个部分,每个部分有 2 个单元格。我正在尝试删除一个单元格,但我得到了这个:
The number of sections contained in the collection view after the update (2) must be equal to the number of sections contained in the collection view before the update (2)
这就是我删除的方式:
NSUInteger arrayLength = 1;
NSUInteger integerArray[] = {0,0};
NSIndexPath *aPath = [[NSIndexPath alloc] initWithIndexes:integerArray length:arrayLength];
[self.collectionFavs deleteItemsAtIndexPaths:[NSArray arrayWithObject:aPath]];
我只想删除带有单元格的单元格或部分。我的错误是什么?