I am writing an application and have a structure similar to the following:
ScrollView {
VStack {
Button(action: {
print("hello")
}) {
Text("Click Me")
}
}
}
When tapping the button, the action code runs properly, but there is no tap animation (i.e. the button does not fade out then fade back in). The fade animation only occurs if you tap and hold on the button.
How can I get this tap animation back? I have tried a number of things suggested in other threads (adding an onTapGesture to the ScrollView, etc.).