I implemented an animated button modifier like this:
Button(“Text”) {
Print(“default action”)
}.modifier(OnTouchDownGestureModifier())
Inside of OnTouchDownGestureModifier, it calls onTapGesture to trigger animation.
func body(content: Content) -> some View {
content
.onTapGesture {
However, default action does not trigger because of onTapGesture.
I tried manually calling the default action in the modifier, but it seems there is no such things.
Could anyone suggest any workaround with this?