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

Can i detect when ScrollView has finished scrolling? #18

Closed
gzlboy opened this issue May 28, 2024 · 5 comments
Closed

Can i detect when ScrollView has finished scrolling? #18

gzlboy opened this issue May 28, 2024 · 5 comments
Labels
wontfix This will not be worked on

Comments

@gzlboy
Copy link

gzlboy commented May 28, 2024

I want to do something when scroll was finished.How can I do this? Thanks!

@danielsaidi danielsaidi added the discussions Discussions not yet turned into an action label May 30, 2024
@danielsaidi
Copy link
Owner

Do you mean that when a scroll event ends and the offset stops updating?

@gzlboy
Copy link
Author

gzlboy commented Jun 2, 2024

Yes!I find a repository that implemented this feature:
https://github.com/fatbobman/IsScrolling

In addition to the scrolling state, it will be better if i can get the scrolling direction:)

@danielsaidi
Copy link
Owner

Would be cool to support! I'll take a look when I get around to this project, and can meanwhile approve and merge any PR that fixes this.

@danielsaidi danielsaidi added feature New feature or request and removed discussions Discussions not yet turned into an action labels Jun 3, 2024
@gzlboy
Copy link
Author

gzlboy commented Jun 4, 2024

Thanks! Look forward to this feature:)

@danielsaidi
Copy link
Owner

danielsaidi commented Oct 5, 2024

@gzlboy If you have the possibility to use iOS 18 and macOS 15, it has a new .onScrollPhaseChange modifier:

.onScrollPhaseChange { _, newPhase in
     ...
}

Since the SDKs scroll views use regular ScrollView underneath, you should be able to add this modifier to its content.

Since there is a native way to do this now, I will not add this to the SDK, and will thus close this issue. If you miss some feature in the SDK to be able to use it, please let me know.

@danielsaidi danielsaidi added wontfix This will not be worked on and removed feature New feature or request labels Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants