Skip to content

在执行刷新动作的时候,切换tab再切回来,刷新头回不去 #892

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

Closed
XHJiang opened this issue Apr 11, 2017 · 10 comments
Closed

Comments

@XHJiang
Copy link

XHJiang commented Apr 11, 2017

No description provided.

@sun8801
Copy link

sun8801 commented Apr 28, 2017

把mjrefreshheader.m中

  • (void)scrollViewContentOffsetDidChange:(NSDictionary *)change方法中的
    if(self.window == nil) return;注释掉应该没问题了

@XHJiang
Copy link
Author

XHJiang commented May 2, 2017

谢谢

@ShenYj
Copy link

ShenYj commented May 22, 2017

试一下

@suxiaoyao
Copy link

遇到同样的问题,总不能每次重新pod都去改代码吧?希望得到回复,应该怎么解决?

@hangshaoSH
Copy link

一个界面上面有多个选择按钮 选择了都是自动下拉刷新 如果网速太慢 一直选择 下拉箭头和字就会一直往下走 如果清空数组 还会出现闪退

@sjjvenu
Copy link

sjjvenu commented Dec 29, 2017

if (self.tableView.mj_header.scrollViewOriginalInset.top > 0 && self.tableView.mj_header.state == MJRefreshState.idle) {
            let oldContentInset = self.tableView.contentInset;
            self.tableView.contentInset = UIEdgeInsets.init(top: 0, left: oldContentInset.left, bottom: oldContentInset.bottom, right: oldContentInset.right);
        }

我是这样解决的,在viewwillappear里面加这段代码,需要判断下当前状态,直接设置成为会把上拉刷新给移到屏幕外了

@leirenbaobao
Copy link

why remove 'if(self.window == nil)' can fix this problem?

@Yulei-Duan
Copy link

why remove 'if(self.window == nil)' can fix this problem? 同问

@AAChartModel
Copy link

虽然临时解决了问题,但总归不是完美的方案啊,话说李明杰老师为毛不在 pod 的文件中改一下呢?

@sun8801
Copy link

sun8801 commented Aug 6, 2018

因为当当前VC不可见时,view.widonw 会为nil,所以代码就不会继续执行复原操作。

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

No branches or pull requests

10 participants