If you don't need any data inbetween drag, than you should simply set:
[mySlider setContinuous: NO];
This way you will receive valueChanged
event only when the user stops moving the slider.
Swift 5 version:
mySlider.isContinuous = false
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…