Post

Replies

Boosts

Views

Activity

Reply to hello
I don't think there is a way to adjust lighting but here is how to make a counter @State var counter: Int = 0     var body: some View {         VStack {             Text("\(counter)")             Button("Count Up") {                 counter += 1             }                          Button("Count Down") {                 counter -= 1             }                   }      
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to Two Variables on a Text Field
I want to add Scene Storage to the Text and a different variable here is some code I tried that did not work. import SwiftUI struct ContentView: View {     @SceneStorage("TextField") var textfield = ""   @State var Text = ""     var body: some View {                 TextField("Placeholder", text: $textfield,                   $Text)     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21