1.scroll view did scroll
问题:
*** -[DetailPageViewController scrollViewDidScroll:]: message sent to deallocated instance 0x19a13c90
原因:
viewController释放之后,scrollViewDidScroll:方法又被调用,
解决:
将调用该方法的delegate置为nil。
2.nsindexpath section
问题:
*** -[NSIndexPath section]: message sent to deallocated instance 0x17dbc970
原因:
The app crashes when someone highlights a cell while scrolling fast, and then the OS tries to unhighlight it when it moves off screen, when it ceases to exist.
解决:
-(BOOL) collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}
return NO; 之后下面的方法无法执行,cell上添加UITapGestureRecognizer手势代替cell点击事件
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{}