I'm trying to switch to Swift Bond 5 and Swift 3 in one of my projects. I'm having problem with two direction binding. How can I convert the code below so when my slider is changing it emits distinct signal in steps and set it's value then to the radius observable value. In old Bond 4 and Swift 2.3 everything was working fine but I don't know how to handle this kind of migration.
let radiusSlider: UISlider = /* slider initialisation */
let radius = Observable<Float>(10.0)
let stepValue:Float = 50.0
let sliderStepObserver = radiusSlider.bnd_value.map { roundf($0/stepValue)*stepValue }.distinct()
radiusSlider.value = radius.value
radius.bidirectionalBind(to: sliderStepObserver) /* here is the problem */
The error message is saying:
Argument type 'Signal<Float, DynamicSubject.Error>' (aka 'Signal<Float, NoError>') does not conform to expected type 'BindableProtocol'
So the signal is not bindable anymore. Does somebody have any ideas how to convert this piece of code so the bidirectional binding still will be working?