Post

Replies

Boosts

Views

Activity

.tint
I am very knew to SwiftUL. First first Projectv was to copy a working SwiftUL code as follows: // // ContentView.swift // Project2 // // Created by Ian Steward on 10/20/24. // 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 get and error saying: "Reference to member 'tint' cannot be resolved without a contextual type" on both both lines that have .tint(.blue) Any ideas on how to correct the issue
1
0
116
Oct ’24