Is it possible to attach a scroll change event to a TabView in SwiftUI? I'd like to get the scroll position when the user touches and drags one of the views, which gets updated on every change of the position.
TabView {
Text("Example 1")
Text("Example 2")
Text("Example 3")
}
.tabViewStyle(PageTabViewStyle())
I tried by adding DragGesture but then the TabView didn't work anymore (probably because the DragGesture takes over the input). I also didn't see any corresponding events in Apple's docs.
Does anyone know a way to implement this?
Cheers..
