To run the example project, clone the repo, and run
pod install from the Example directory first.
HSCenterSlider is available through CocoaPods. To install it, simply add the following line to your Podfile:
How to use?
- Drag the UIView and drop in to the storybaord or XIB
- Give class HSHorizontalCenterSlider or HSVerticleCenterSlider to the view. That's it.
- Your center slider is ready to use in just two steps
- Change slider range between any two values, Default range is (-100,100)
slider.rangeValue = HSRange(low: -200, high: 100)
- Get value changes call back during user interaction using delegate method declared in the protocol HSCenterSliderDelegate
func centerSlider(slider: HSCenterSlider, didChange value: Double)
- Change the tint color of prograss view like a native UISlider
slider.tintColor = UIColor.black
[!] Unable to find a specification for 'HSCenterSlider'
[email protected]Hitendra Solanki,
GithubFind my repositories on
MediumRead my blogs on
HSCenterSlider is available under the MIT license. See the LICENSE file for more info.