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

Call endRefreshing(at: .top) has no effect #128

Open
zyvv opened this issue Jun 10, 2021 · 2 comments
Open

Call endRefreshing(at: .top) has no effect #128

zyvv opened this issue Jun 10, 2021 · 2 comments

Comments

@zyvv
Copy link

zyvv commented Jun 10, 2021

If I only add PullToRefresh on top and not bottom, then calling endRefreshing(at: .top) will have no effect.

In addition, if the top constraint of scrollView can follow the height-change of the navigation bar (make.edges.equalToSuperview()), like Twitter or YouTube app, scrollview will bounce and other problems.

@wuxiangru
Copy link

func endRefreshing() {
// guard isEnabled else { return }

    if state == .loading {
        state = .finished
    }
}

去掉

@pokeduck
Copy link

pokeduck commented Mar 18, 2022

If I only add PullToRefresh on top and not bottom, then calling endRefreshing(at: .top) will have no effect.

In addition, if the top constraint of scrollView can follow the height-change of the navigation bar (make.edges.equalToSuperview()), like Twitter or YouTube app, scrollview will bounce and other problems.

Invoke refreshControl.setEnable(isEnabled: true) before calling endRefreshing(at: .top).

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

3 participants