Hello everyone. I'm getting an error in my code and I don't know why. Can someone explain it to me?
import SwiftUI
struct ContentView: View{
var body: some View{
VStack {
Button {} label: {
Text("Click Me")
}
.buttonStyle(.glass)
.frame(width: 200, height: 200)
}
}
}
The error is as follows:
Reference to member 'glass' cannot be resolved without a contextual type
Thanks for your help
Selecting any option will automatically load the page