用了Mj下拉刷新出现崩溃

用了Mj下拉刷新 出现:An instance 0xca90200 of class UITableView was deallocated while key value observers were


An instance 0xca90200 of class UITableView was

deallocated while key value observers were still registered with it.

Observation info was leaked, and may even become mistakenly attached to

some other object. Set a breakpoint on NSKVODeallocateBreak

to stop here in the debugger. Here's the current observation info:

(

0xc5e9560, Key path: contentOffset, Options:

Prior: NO> Context: 0x0, Property: 0xd249490>

0xd241970, Key path: contentSize, Options:

NO> Context: 0x0, Property: 0xd251df0>

0xd241970, Key path: contentOffset, Options:

Prior: NO> Context: 0x0, Property: 0xd249490>

)

翻译的意思大概就是,uitableview注册了观察者,然后没有被注销掉,又开始重复使用了。

从列表页面进入到详情页,然后详情页的布局是一个scrollview上放了一个uitableview,uitableview继承了上拉刷新。

我发现这个问题的由来: 当我第一次点详情页后,然后返回,第二次进去,然后返回,次数多了以后。然后就Collapse崩溃了。

解决方法:

- (void)dealloc

{

    [_headerfree];

    [_footerfree];

}

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容