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

fixed #311 pagingEnabled=YES的时候上拉内容偏移问题 #344

Closed
wants to merge 1 commit into from

Conversation

xdongdan
Copy link

判断self.scrollView.pagingEnabled,如果为YES就不修改mj_offsetY

fixed #311

判断self.scrollView.pagingEnabled,如果为YES就不修改mj_offsetY
@CoderMJLee
Copy link
Owner

tableView设置pagingEnabled是个啥情况?可以发个tableView使用pagingEnabled的案例不?谢谢哈

@xdongdan
Copy link
Author

刷新完成后会偏移

2015-10-12 22:06 GMT+08:00 M了个J notifications@github.com:

tableView设置pagingEnabled是个啥情况?可以发个tableView使用pagingEnabled的案例不?谢谢哈


Reply to this email directly or view it on GitHub
#344 (comment).

@CoderMJLee
Copy link
Owner

给tableView设置了pagingEnabled,那就是垂直方向上翻页了吧?

@xdongdan
Copy link
Author

是的

@CoderMJLee
Copy link
Owner

我试了下,还是不能解决问题哈,可以尝试这么做

self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
    self.tableView.pagingEnabled = NO;
    // 执行任务

    // 模拟执行完任务以后
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self.tableView.header endRefreshing];
        self.tableView.pagingEnabled = YES;
    });
}];

@CoderMJLee
Copy link
Owner

看了微博,发现你是个妹子吖,厉害厉害,哈哈

@xdongdan
Copy link
Author

untitled
你说的那种方法我尝试过 但是如果下拉的比较多的话刷新完成还是会有偏移

@isnail
Copy link

isnail commented Jul 4, 2016

大神,这个问题还在啊,好头疼啊

Copy link
Collaborator

@wolfcon wolfcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有解决

@mrhyh
Copy link

mrhyh commented Nov 12, 2019

我试了下,还是不能解决问题哈,可以尝试这么做

self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
    self.tableView.pagingEnabled = NO;
    // 执行任务

    // 模拟执行完任务以后
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self.tableView.header endRefreshing];
        self.tableView.pagingEnabled = YES;
    });
}];

这样的话,pagingEnabled=NO,垂直翻页的功能就会有一段时间失效

@wolfcon wolfcon closed this Nov 27, 2019
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.

在tableview使用分页滑动pagingEnabled = YES的时候,整个人都不好了
5 participants