Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header刷新不回弹的问题 #1329

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

liuxiaoxinxin
Copy link

在状态变化时,我不太明白当初为什么单独在UI切换至MJRefreshStateRefreshing状态时使用DispatchAsync,而在切换至MJRefreshStateIdle状态时不使用DispatchAsync。
我认为setState的调用者应该确保在主线程调用的,而不是在set方法内再用异步分发到主线程。

这里做DispatchAsync只会造成一个严重点问题:
如果beginRefreshing和endRefreshing在很近的时间段调用(这很常见,比如网络请求完成调用endRefreshing后,刚好用户又点击了TabBar按钮触发beginRefreshing),由于异步分发,可能会先执行恢复滚动区域再执行增加滚动区域, 造成头部累积增加contentInset.top,体验相当糟糕。

所以我去掉了MJRefreshDispatchAsyncOnMainQueue()部分,经过有限的测试没有发现其他问题。

@zmXie
Copy link

zmXie commented Aug 16, 2019

在ios12下,scrollview的contentInsetAdjustmentBehavior是默认状态,非调试状态,下拉刷新不会回弹,且contentInset.top会累积增加,但是连线调试又没有这个bug。。蛋都碎了

@NeverMaybe
Copy link

已经回退老版本

@jiexishede
Copy link

我也是遇到了偶尔下拉刷新不复位的情况。 这个问题哪个版本解决了, 希望在这里回复下。 更新到解决的版本试试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants