Learn how to detect when the user moves the slider, and how to store the result in a variable.
This is a companion discussion topic for the original entry at https://www.kodeco.com/37086140-your-first-ios-swiftui-app-an-app-from-scratch/lessons/16
Learn how to detect when the user moves the slider, and how to store the result in a variable.
Why is the slidervalue a double to begin with?
in the string interpolation in the part of
print(“the slider’s value is (sliderValue).”)
why we didn’t wrote a $ before the sliderValue ?
print(“the slider’s value is ($sliderValue).”)
because the view will be updated every time the user hits the hit me button