1. 自己写一个Button样式
struct StaticButtonStyle: ButtonStyle {
func makeBody(configuration: Configuration) -> some View {
configuration.label
}
}
2. 然后在NavigationLink或Button上设置buttonStyle
.buttonStyle(StaticButtonStyle())
1. 自己写一个Button样式
struct StaticButtonStyle: ButtonStyle {
func makeBody(configuration: Configuration) -> some View {
configuration.label
}
}
2. 然后在NavigationLink或Button上设置buttonStyle
.buttonStyle(StaticButtonStyle())