I\'ve gotten several crash reports related to a UICollectionView in iOS 7. I\'m not able to consistently recreate this crash.
Exception Type: SIGSEGV
Exception
I had this problem, though slightly different crash. Fixed by holding off any reloadData until the highlight is cleared. While toostn's suggestion would fix the issue, it is useful to be able to reloadData whilst scrolling, but doesn't make much sense when highlighting - as you have your finger on a cell.
implement the following UICollectionViewDelegate methods:
- (BOOL)collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath {
self.allowReload = NO;
return YES;
}
- (void)collectionView:(UICollectionView *)collectionView didUnhighlightItemAtIndexPath:(NSIndexPath *)indexPath {
self.allowReload = YES;
[self reloadIfNecessary]; // calls reloadData if it is necessary to do so!
}