How to disable user interaction on SwiftUI view?
What about using the .allowsHitTesting()?
https://developer.apple.com/documentation/swiftui/image/3269586-allowshittesting
From my understanding it should pass the gesture to the view behind if it's disabled.
ZStack() {
ScrollView {
...
}
Text("Hello.").allowsHitTesting(false)
}
There is a modifier on View to disable or enable user interaction:
disabled(_ disabled: Bool)