页面1、2(tableview)皆有使用MJ刷新,从页面1跳到页面2,页面2再次返回页面1一次或多次此操作,就会出现页面崩掉的情况,错误代码如下:
[15861:457829] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7fb6eb015000 of class UITableView was deallocated while key value observers were still registered with it.
解决方法如下:
在页面中加入代码:
- ( void )dealloc
{
[ _headerView free ];
[ _footerView free ];
}