Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to delete a item #13

Open
JRJian opened this issue Sep 11, 2019 · 0 comments
Open

How to delete a item #13

JRJian opened this issue Sep 11, 2019 · 0 comments

Comments

@JRJian
Copy link

JRJian commented Sep 11, 2019

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant