There is a new scrollview listener or something right where you can get scroll positions

Generated on 9/13/2024

1 search

Yes, there is a new feature in SwiftUI related to scroll views that allows you to get scroll positions. In the session titled "What’s new in SwiftUI," it was mentioned that you can now have a deeper level of integration with the state of a scroll view using the onScrollGeometryChange modifier. This lets you react to changes in content offsets, content size, and more. Additionally, you can detect when a view's visibility changes due to scrolling, which can be used to create experiences centered around content moving on or off the screen, such as auto-playing videos.

For more details, you can refer to the session What’s new in SwiftUI (16:47).