How can i disable the default Button click animation in SwiftUI and Swift 5? I tried to add .animation(.nil)
to the button, without any changes.
I know that you can do the following:
Button(action: {}) { Capsule() }
.buttonStyle(NoAnim())
struct NoAnim: ButtonStyle {
func makeBody(configuration: Self.Configuration) -> some View {
configuration.label
}
Does anybody know a smarter way?