Git Product home page Git Product logo

Comments (8)

yulingtianxia avatar yulingtianxia commented on May 28, 2024

@FanJianRong 请问下你使用的版本是什么呢?是否对 collectionView 的对象和父类同时限频了呢?或者对 collectionView 使用了 KVO?

from messagethrottle.

FanJianRong avatar FanJianRong commented on May 28, 2024

前一天下下来的最新版本;只有这一处地方试用;下拉刷新使用的 MJRefresh ,有一处使用到 KVO

NSKeyValueObservingOptions options = NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld;
[self.scrollView addObserver:self forKeyPath:MJRefreshKeyPathContentOffset options:options context:nil];
[self.scrollView addObserver:self forKeyPath:MJRefreshKeyPathContentSize options:options context:nil];
self.pan = self.scrollView.panGestureRecognizer;
[self.pan addObserver:self forKeyPath:MJRefreshKeyPathPanState options:options context:nil];

from messagethrottle.

yulingtianxia avatar yulingtianxia commented on May 28, 2024

@FanJianRong 如果方便的话,能提供下工程代码或者能复现的 demo 么?
因为 KVO 的对象不是 collectionView,还找不到问题原因。
beginHeaderRefresh 方法是否使用 Method Swizzling 之类的 hook 过呢?

from messagethrottle.

FanJianRong avatar FanJianRong commented on May 28, 2024

Demo.zip
工程复现不了,不过这demo有点问题,主要看下所用到的工具吧,跟这个demo的差不多。

from messagethrottle.

yulingtianxia avatar yulingtianxia commented on May 28, 2024

@FanJianRong 我推测应该跟 KVO 有关系,而且MJ使用 KVO 和 MessageThrottle hook 的顺序,以及 remove KVO 和 hook 的顺序都会影响结果。要是能有个复现的 demo 就好了。
还有一种可能就是,你也使用了 Aspects 之类的工具 Hook 了UICollectionView 的父类。

from messagethrottle.

yulingtianxia avatar yulingtianxia commented on May 28, 2024

@FanJianRong 感觉堆栈信息不全,因为 mt_forwardInvocation 会调用 mt_handleInvocationmt_executeOrigForwardInvocation,堆栈里找不到呀。

from messagethrottle.

FanJianRong avatar FanJianRong commented on May 28, 2024

@yulingtianxia
log.txt

from messagethrottle.

yulingtianxia avatar yulingtianxia commented on May 28, 2024

@FanJianRong 感谢提供 log!不过本人才疏学浅,还是没找到必现场景和原因。。。哎

from messagethrottle.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.