Originally there was a picker to choose a few seconds.
@AppStorage("timer_Value") var timerValue = 10
I want to treat this as 10 minutes and 600 seconds instead of 10 seconds.
I tried various things for that, but I get an error. Why are you getting these errors? What do I not know? What should i do? I would like you to tell me.
1
@State var trueTimerValue = timerValue * 60
↓
// Error displayed
Cannot use instance member 'timerValue' within property initializer; property initializers run before 'self' is available
2
I copied the code that was in the book var area: Int { sideLength * sideLength }
↓
@State var trueTimerValue: Int { timerValue * 60 }
// Error displayed
Property wrapper cannot be applied to a computed property
I would appreciate it if you could answer.