cardslider icon indicating copy to clipboard operation
cardslider copied to clipboard

How to delete a item

Open JRJian opened this issue 5 years ago • 0 comments

I tried to delete a cell from collection view on didSelect method. But I had get a crash:[self.collectionView performBatchUpdates:^{ [self.movies removeObjectAtIndex:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; [self.collectionView deleteItemsAtIndexPaths:@[indexPath]]; } completion:^(BOOL finished) { NSLog(@"finished"); }]; Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'

JRJian avatar Sep 11 '19 01:09 JRJian