UISlider that snaps to a fixed number of steps (like Text Size in the iOS 7 Settings app)
问题 I'm trying to create a UISlider that lets you choose from an array of numbers. Each slider position should be equidistant and the slider should snap to each position, rather than smoothly slide between them. (This is the behavior of the slider in Settings > General > Text Size , which was introduced in iOS 7.) The numbers I want to choose from are: -3, 0, 2, 4, 7, 10, and 12. (I'm very new to Objective-C, so a complete code example would be much more helpful than a code snippet. =) 回答1: Some