ScrollViewOffset is a Swift package that provides a ScrollView with an offset callback.
You can add ScrollViewOffset to an Xcode project by adding it as a package dependency.
- From the File menu, select Add Packages.
- Enter the package repository URL:
https://github.com/gavinmn/ScrollViewOffset
structScrollViewOffsetTest:View{varbody:someView{ScrollViewWithOffset(){ //ScrollViewWithOffset(axes: .horizontal) for horizontal scrolling
ForEach(0..<40){ _ inCircle().frame(width:64, height:64)}} onScroll:{ offset inprint(offset)}}}