SwiftUI Bindings | raywenderlich.com

This is a companion discussion topic for the original entry at https://www.raywenderlich.com/17493408-your-first-ios-and-swiftui-app-an-app-from-scratch/lessons/14

Hi. Not sure if this is the correct way to post a question on this lesson. Excuse if I am doing this wrong.

Why do we need to use self before the binding in the slider: Slider(value: self.$sliderValue, in: 1.0…100.0)? :thinking:


Never mind. I see you covered this in a later lesson.

Yep! I thought it might be helpful for folks to see the “long way” of doing things before the “nice shortcut” that we see later, since it’s good for understanding how things work under the hoods.

1 Like