Cannot remove an observer for the key path "" from because it is not registered

开发环境:XCODE4.6.3

IOS sdk:6.1 + ARC

 

问题描述: 在使用pullToRefresh做下拉刷新时,出现错误,代码如下

Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <PullingRefreshTableView 0x80b0a00> for the key path "contentSize" from <PullingRefreshTableView 0x80b0a00> because it is not registered as an observer.'

 

 

解决方法如下:

Change the property in PullToRefreshView.h to this:

@property (nonatomic, strong) id<PullToRefreshViewDelegate> delegate;

So change it from “assign” to “strong”.

 

参考资料:http://sonnyparlin.com/2011/12/pulltorefresh-ios-5-and-arc-tutorial/

你可能感兴趣的:(ios)