用了Mj下拉刷新出现崩溃

2018-06-05  本文已影响0人  bmm_jianshu

用了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];

}

上一篇下一篇

猜你喜欢

热点阅读