Skip to content

Instantly share code, notes, and snippets.

@hirauchg
Last active August 19, 2020 13:43
Show Gist options
  • Save hirauchg/88aa4a8ca5ebc7c5c884d831ae6013e7 to your computer and use it in GitHub Desktop.
Save hirauchg/88aa4a8ca5ebc7c5c884d831ae6013e7 to your computer and use it in GitHub Desktop.
ボタンのスタイルの変更
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(spacing: 20) {
Button(action: {}) {
Text("Button").font(.title)
}
.buttonStyle(DefaultButtonStyle())
Button(action: {}) {
Text("Button").font(.title)
}
.buttonStyle(BorderlessButtonStyle())
Button(action: {}) {
Text("Button").font(.title)
}
.buttonStyle(PlainButtonStyle())
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment