I need to find out the exact moment when my ScrollView stops moving.
Is that possible with SwiftUI?
Here would be an equivalent for UIScrollView.
I have no idea after thinking a lot about it...
A sample project to test things out:
struct ContentView: View {
var body: some View {
ScrollView {
VStack(spacing: 20) {
ForEach(0...100, id: \.self) { i in
Rectangle()
.frame(width: 200, height: 100)
.foregroundColor(.green)
.overlay(Text("\(i)"))
}
}
.frame(maxWidth: .infinity)
}
}
}
Thanks!
