`
zfanxu
  • 浏览: 127299 次
  • 性别: 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/

分享到:
评论

相关推荐

    DSP-Based speed adaptive flux observer

    DSP-Based speed adaptive flux observer.T is widely used for induction motor drives. This method needs a speed sensor such as a shaft encoder not only for speed control but also for torque control. ...

    Current Model Flux Observer for Wide Speed

    Current Model Flux Observer for Wide Speed.

    QT做的经典2048游戏

    The core is decoupled from the GUI using the observer pattern, so it is easy to pull the code, extract the core and then build a new GUI around it. 1. Download and install Qt ...

    An Adaptive Nonlinear Extended State Observer for the Sensorless Speed Control of a PMSM

    在标题和描述中提到的知识点是关于"An Adaptive Nonlinear Extended State Observer for the Sensorless Speed Control of a PMSM"的研究,也就是针对永磁同步电机(Permanent Magnet Synchronous Motor, PMSM)的无...

    ethereal网络抓包工具

    Ethereal is a GUI network protocol analyzer. It lets you interactively browse packet data from a live network or from a previously saved capture ... the '.gz' extension is not required for this purpose.

    Observer模式

    Observer模式,也被称为“发布-订阅”模式,是软件设计模式中的行为模式之一。它定义了对象之间的一对多依赖关系,当一个对象的状态发生改变时,所有依赖于它的对象都会得到通知并自动更新。Observer模式是实现...

    Observer模式代码实现

    observers.remove(observer); } public void Notify() { for (int i = 0; i (); i++) { observers.get(i).notify(); } } } ``` `Subject` 定义了一个观察者集合,并提供了添加、移除观察者以及通知所有...

    Observer设计模式实例

    Observer设计模式,也被称为“发布-订阅”(Publish-Subscribe)模式或“依赖倒置”模式,是软件设计中的一种行为模式。它定义了对象之间的一对多依赖关系,当一个对象的状态发生改变时,所有依赖于它的对象都会得到...

    Learning Python Design Patterns 2nd 2016第2版 无水印pdf 0分

    With the increasing focus on optimized software architecture and design it is important that software architects think about optimizations in object creation, code structure, and interaction between ...

    observable-observer

    观察者模式(Observer Pattern)是一种行为设计模式,它允许你定义一个订阅机制,可以在对象状态改变时通知多个“观察者”对象,使它们能够自动更新自己。在Java中,`Observable`类和`Observer`接口是内置的实现,...

    C++ Observer 实现

    在IT行业中,设计模式是软件开发中的重要概念,它们提供了在特定情况下解决常见问题的模板。"C++ Observer"实现是面向对象编程中的一种经典设计模式,主要用于建立一种一对多的依赖关系,使得当一个对象的状态发生...

    Improving the load-following capability of a solid oxide fuel cell system

    This paper introduces a time delay control with an observer (TDO) in the fuel supply system to enhance the load-following capability to realize rapid load-following without fuel starvation. A dynamic...

    Beyond the C++ Standard Library An Introduction to Boost

    the Observer pattern) with Boost.Signals &lt;br&gt;The Boost libraries are proving so useful that many of them are planned for inclusion in the next version of the C++ Standard Library. Get your head ...

    观察者模式,Observer

    观察者模式(Observer Pattern)是设计模式中的一种行为模式,它定义了对象之间的一对多依赖关系,当一个对象的状态发生改变时,所有依赖于它的对象都会得到通知并被自动更新。这种模式常用于实现事件驱动的系统或者...

    Comments on “Designing a Novel Adaptive Impulsive Observer for Nonlinear Continuous Systems Using LMIs”

    A recently reported result concerning the designing adaptive impulsive observer for nonlinear continuous-time systems using LMI-... It is shown that a key condition of the result can not be satisfied.

    Beyond.the.C++ - Standard.Library.An.Introduction.to.Boost

    the Observer pattern) with Boost.Signals &lt;br&gt;The Boost libraries are proving so useful that many of them are planned for inclusion in the next version of the C++ Standard Library. Get your head ...

Global site tag (gtag.js) - Google Analytics