I\'m experimenting with SwiftUI and the Slider control like this:
struct MyView: View {
@State private var value = 0.5
var body: some View {
I am not able to reproduce this issue on iOS 13 Beta 2. Which operating system are you targeting?
Using a custom binding, the value is printed for every small change, not only after editing ended.
Slider(value: Binding(getValue: {0}, setValue: {print($0)}))
Note, that the closure ({ pressed in }
) only reports when editing end starts and ends, the value stream is only passed into the binding.