Adding a drag gesture in SwiftUI to a View inside a ScrollView blocks the scrolling

You can set minimumDistance to some value (for instance 30).
Then the drag only works when you drag horizontally and reach the minimum distance, otherwise the scrollview or list gesture override the view gesture

.gesture(DragGesture(minimumDistance: 30, coordinateSpace: .local)

Leave a Comment