If there a delayscontenttouches equivalent on SwiftUI ScrollView?

Viewed 132

In SwiftUI, Buttons highlight on touch.

But when you place one into a ScrollView, it will also highlight when the user scrolls.

On UIKit, the delayscontenttouches UIScrollView's property exactly fixes this problem, but I haven't found a SwiftUI way to do it.

Here's some basic code that reproduces the problem.

ScrollView {
    VStack {
        Button(action: {
            print("1")
        }, label: {
            Color.blue.frame(height: 300)
        })
        Button(action: {
            print("2")
        }, label: {
            Color.blue.frame(height: 300)
        })
        Button(action: {
            print("3")
        }, label: {
            Color.blue.frame(height: 300)
        })
    }
}
0 Answers
Related