UICollectionView 刷新有关问题。reload不能直接用
UICollectionView 刷新问题。reload不能直接用
刷新UICollectionView的时候不能直接用 reload方法。。。
[self reloadInputViews]; ///这句至关重要。。。。
NSIndexPath *indexPath = [self.collectionViewindexPathForCell:slideDeleteCell];
[self.collectionViewperformBatchUpdates:^(void) {
[_myData removeObjectAtIndex:indexPath.row];
[self.collectionViewdeleteItemsAtIndexPaths:@[[NSIndexPathindexPathForRow:indexPath.rowinSection:0]]];
[selfreloadInputViews];
} completion:nil];