Skip to content

UITableView 频繁调用刷新和结束会导致出现空白回不去 #1538

Closed

Description

@zhangzhen-inagora

描述bug

2021-08-11.3.10.11.mov

必现/偶发?
必现

怎么样重现这个bug
连续调用下面3行代码就能复现
[tableView.mj_header endRefreshing];
[tableView.mj_header beginRefreshing];
[tableView.mj_header endRefreshing];

你期望的结果是什么?
就是解决bug之后的结果

截图
如果有必要的话,请上传几张截图
image

运行环境

  • iPhone6
  • iOS8.1
  • Xcode10

额外的
最好能提供出现bug的Demo

Activity

  1. zhangzhen-inagora commented on Aug 11, 2021

    @zhangzhen-inagora
    Author

    MJRefresh.zip
    这个是我的demo,我已经找到问题原因,自己forke了一个3.2.0的分支修复了这个问题,主要原因是MJRefreshDispatchAsyncOnMainQueue这个宏,如果线程已经在main的话,你再使用dispatch_get_main,会等当前main线程结束之后,才能拿到main线程,进而代码出现时序的问题
    image
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions