`
zfanxu
  • 浏览: 126001 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

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

ios 
阅读更多

开发环境: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/

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics