码迷,mamicode.com
首页 > 其他好文 > 详细

message sent to deallocated instance 多次释放

时间:2015-11-12 13:16:37      阅读:331      评论:0      收藏:0      [点我收藏+]

标签:

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
{}

message sent to deallocated instance 多次释放

标签:

原文地址:http://www.cnblogs.com/rgshio/p/4958432.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!