UISlider with certain possible values
问题 I am willing to do this widget: Just A-B-C can be chosen. Any idea if someone already did something similar? If not, how would you do it? 回答1: Personally I'd use a standard UISlider and add logic to the valueChanged handler, so that once the user has dragged the slider to an arbitrary point on the scale, the code determines which is the nearest 'valid' value, and would manually set the value to a valid number. E.g. if the user drags the slider to 0.9, the distances to valid points are 0.9 (to