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
我需要下拉 60px 松手刷新, 超过 100px 松手执行其他功能,请问使用 MJRefresh 可以实现吗? #1582
Labels
feature
新功能建议
Comments
参照 MJRefreshHeader 的这段代码, 在我的注释位置做修改, 增加 State 的状态. 在 - (void)scrollViewContentOffsetDidChange:(NSDictionary *)change
{
[super scrollViewContentOffsetDidChange:change];
...
// 在此处判断 < normal2pullingOffsetY 是刷新, 你自己计算> xxx && < xxx, 刷新 UI , > xxxx 打开新页面
if (self.state == MJRefreshStateIdle && offsetY < normal2pullingOffsetY) {
// 转为即将刷新状态
self.state = MJRefreshStatePulling;
} else if (self.state == MJRefreshStatePulling && offsetY >= normal2pullingOffsetY) {
// 转为普通状态
self.state = MJRefreshStateIdle;
}
} else if (pullingPercent < 1) {
self.pullingPercent = pullingPercent;
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你的新功能建议是否牵扯到某个常见的问题?
NO
你希望达到的效果
我需要在下拉到不同的阶段执行一些不同的任务, 比如 60-100 松手是刷新,100-200 松手修改刷新 UI,超过 200 松手打开新的页面。
你能考虑到的可选实现方案
想问一下现有 MJRefresh 是否可以实现。
The text was updated successfully, but these errors were encountered: