An instance 0x172b8600 of class UITableView was deallocated while key value

从带有tableview并且使用Mj下拉刷新的视图调用popViewControllerAnimated的时候,控制台打印这个:
An instance 0x15d7aa00 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:
<NSKeyValueObservationInfo 0x16835900> (
<NSKeyValueObservance 0x16835a40: Observer: 0x16834ed0, Key path: contentOffset, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x15748160>
)

解决办法:

- ( void )dealloc{

  [ _header free ];

  [ _footer free ];

}

 
时间: 2024-08-30 02:43:57

An instance 0x172b8600 of class UITableView was deallocated while key value的相关文章

旧Mj下拉刷新 An instance 0xca90200 of class UITableView was deallocated while key value observers were s

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

xcode工程编译错误:&quot;An instance 0xca90200 of class UITableView was deallocated while key value observers were still registered with it&quot;

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

iOS 错误:… is being deallocated while key value observing are still registered with it

这个错误从字面上来看就是有一个实例由于被observing而无法被释放. 具体原因可能是该对象添加了一个oberver.所以释放的时候要先取消observer. 具体方法是在 dealloc 方法中: - (void)dealloc { [object removeObserver:self forKeyPath:@"aPath"]; } ARC 下不能调用 super 的 dealloc 方法.

KVO内部实现原理

// // ViewController.m // KVO内部实现原理 // // Created by sw on 15/4/13. // Copyright © 2015年 sw. All rights reserved. // #import "ViewController.h" #import "Person.h" @interface ViewController () @end @implementation ViewController - (void

IOS UI基础04

动画 1.头尾式动画 动画开始 [UIView beginAnimations:nil context:nil]; 设置动画时间 [UIView s ! etAnimationDuration:3]; [UIView setAnimationDelegate:self]; 只要写在开始和结束之间的代码, 就会被执行动画 但是: 并不是所有的代码都能够执行动画 只有属性声明中说明了是animatable的属性,才可以执行UIView动画 CGRect tempFrame2 = self.hudLa

IOS开发——UI基础-KVO

KVO == Key Value Observing 作用: 可以监听某个对象属性的改变 一.使用KVO Person *p = [Person new]; p.name = @"chg"; p.age = 30; // 给p这个对象添加一个监听 , 监听p对象的age属性的改变, 只要age属性改变就通知self [p addObserver:self forKeyPath:@"age" options:NSKeyValueObservingOptionOld |

NSKeyValueObserving(KVO)

NSKeyValueObserving非正式协议定义了一种机制,它允许对象去监听其它对象的某个属性的修改. 我们可以监听一个对象的属性,包括简单属性,一对一的关系,和一对多的关系.一对多关系的监听者会被告知集合变更的类型,以及哪些对象参与了变化. NSObject提供了一个NSKeyValueObserving协议的默认实现,它为所有对象提供了一种自动发送修改通知的能力.我们可以通过禁用自动发送通知并使用这个协议提供的方法来手动实现通知的发送,以便更精确地去处理通知. 在这里,我们将通过具体的实

当AVPlayer在被释放之后,Player一直监听的时间没有被移除,提示错误的解决办法

Xcode Consolu打印出来的提示: An instance 0x156608c0 of class AVPlayer 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 NSK

iOS programming UITableView and UITableViewController

iOS programming? UITableView and UITableViewController A UITableView displays a single column of data with a variable number of rows. UITableView 展示单列数据和不定数量的行. ? ?Create a new iOS Empty Application project and configure it 1.1 UITableViewController