When we place a Button inside a ScrollView , the fade animation of the button is delayed, so most users won't see it I think. You can see this in the trivial example
struct ContentView: View { var body: some View { ScrollView { Button { // empty } label: { Text("Fade animation test") } } } }
Is there any way to opt out of this behavior? In UIKit, this was also the default behavior, but you could always change it by overriding touchesShouldCancel method.
I think I can probably do that by rewriting an animation completely with some custom ButtonStyle or by rewriting a Button component completely, but it doesn't seem like a good solution to me, as I want the native look and feel (in case of button animation it is pretty easy to mimic though).
And also for some components, like lists, Apple has already implemented the correct behavior by themselves somehow.