Welcome to the forum.
When you post code, please use the code formatter tool:
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(spacing: 20) {
Text("SwiftUI Button")
.font(.largeTitle)
Text("Enabled & Disabled")
.font(.title)
.foregroundColor(.gray)
/* Disabled */
Button("Enabled") {}
.buttonStyle(.borderedProminent)
.tint(.blue)
.controlSize(.large)
Button("Disabled") {}
.buttonStyle(.borderedProminent)
.tint(.blue)
.controlSize(.large)
.disabled(true)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
I tested on iOS simulator, it works
Topic:
UI Frameworks
SubTopic:
SwiftUI