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];

猜你喜欢

转载自zhangmingwei.iteye.com/blog/2102828
今日推荐