Post

Replies

Boosts

Views

Activity

Reply to hello
I don't know how to arrange the text Sorry, but I want to control the brightness. Can you create a code and slider ? How was this important code with the lighting control feature so that the user can modify the lighting from within the application, not through the system by pulling the tape!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to hello
import SwiftUI struct boton: View {          @State var boton : String = "S"     var body: some View {                                            VStack {                          Text("bnvnb: \(boton)")                          Button(action: {                 self.boton = self.boton + "S"                                      } ) {                                  /*@START_MENU_TOKEN@*/Text("Button")/*@END_MENU_TOKEN@*/                                  }                      }              }      }   This is the button file you recalled
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to hello
     ZStack {             LinearGradient(gradient: Gradient(colors: [Color.orange, Color.yellow, Color.white]), startPoint: .top, endPoint: .bottom)                 .edgesIgnoringSafeArea(.all)                 SwiftUIView()                 boton()                                .font(Font.system(size: 80))                     .offset(x: 10, y: -10)                      }         UIScreen.main.brightness = 0.1 // between 0 and 1     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to hello
Could you place the order here please Code Block @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 hello
I will try to do justice to it, show it to me I tried it, the screen turned off and the button stayed on, but I couldn't connect the brightness to a button Because I don't know how At first I was going to link the button and the counter with the volume up and down button, but it is forbidden, then I got this idea
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21