Is it possible to have the thumb snap to one of the anchor points? I browsed the example and didn't see anything obvious in terms of exposed properties that would allow this. I then tried setting the slider value in the following callback:
func sliderDidEndSwiping() {
print("Slider did end swiping")
let newSliderValue = sliderController.sliderValue
// calculate closest anchor value based on newSliderValue
sliderController.setSlider(value: closestAnchorValue, animated: false)
print(sliderController.sliderValue)
}
Unfortunately, it seems that after this method gets called, the value immediately goes back to "newSliderValue" (i.e., even before the next view layout). I could call setSlider on a delayed call ... but that seems like a real hack. Any thoughts?
Is it possible to have the thumb snap to one of the anchor points? I browsed the example and didn't see anything obvious in terms of exposed properties that would allow this. I then tried setting the slider value in the following callback:
Unfortunately, it seems that after this method gets called, the value immediately goes back to "newSliderValue" (i.e., even before the next view layout). I could call setSlider on a delayed call ... but that seems like a real hack. Any thoughts?