Skip to content

下拉刷新偶现不能返回到顶部 #1546

@kedu

Description

@kedu

描述bug
下拉刷新偶现不能返回到顶部

必现/偶发?
偶现

我的诉求是我替换了MJRefreshDispatchAsyncOnMainQueue会不会出现问题。因为这个解决了问题。
具体看我下面贴的代码
// 异步主线程执行,不强持有Self
//#define MJRefreshDispatchAsyncOnMainQueue(x)
//__weak typeof(self) weakSelf = self;
//dispatch_async(dispatch_get_main_queue(), ^{
//typeof(weakSelf) self = weakSelf;
//{x}
//});
#define MJRefreshDispatchAsyncOnMainQueue(x)
__weak typeof(self) weakSelf = self;
if ([NSThread isMainThread]) {
typeof(weakSelf) self = weakSelf;
{x}
} else {
dispatch_async(dispatch_get_main_queue(), ^{
typeof(weakSelf) self = weakSelf;
{x}
});
}

希望能快点回答一下我,我这个项目就要上线了。

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions