Great!!Inspired by your answers, I find that ".buttonStyle(BorderlessButtonStyle())" is the key point. If I apply it to Button view in my code above. The action block indeed works! But I can't get the reason. In addition, how could I prevent the onTapGesture block from working for Button? In other words, how could I make action block work only(mask the onTapGesture block )?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: