This should work.
struct ContentView: View {
@State var testvar:Double = 66.78
var body: some View {
Text("\(testvar)")
}
}
Post
Replies
Boosts
Views
Activity
there is a way to adjust the device brightness by pressing a button but that will not work like you want it to.
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
}
}
I tried that I probably need the paid developer account.
try 100 days of swiftUI on hacking with swift.
when I click on this link https://developer.apple.com/app-clips/resources/ on click on app clip generator it takes me to downloads page but there is no software.
Thanks.
here is the error message there is only one. Initializer 'init(value:total:)' requires that 'BindingInt' conform to 'BinaryFloatingPoint'
there is a error that keeps popping up on line 17.
Go to /file/new/file/ then select swiftUI view or if you want to load a new scene when pressing a button use a navigation link.
Thanks.
There is a reason I want two variables in a textfield but just forget it.
I want to type something up and make appear somewhere else but I also want it to be saved with SceneStorage too. I'm a Beginner coder I need help.
I trying to figure out how to two variables to a textfield and telling a other guy what textfield I meant by.
never mind about the $0 I figured it out.