Default range slider made in Swift
The default value is similar to the swift slider.
This control was created in an environment without a storyboard. If the thumb value changes, use the value with reference to.
import DJRangeSlider
let rangeSlider = RangeSlider()
view.addSubView(rangeSlider)
rangeSlider.addTarget(self, action: #selector(rangeSliderValueChanged(_:)), for: .valueChanged)Customizes the slider with the following values, and the properties provide access to information.
- minValue : Current value of minimum thumb
- maxValue : Current value of maximum thumb
- minRange : Minimum range value for slider
- maxRange : Maximum range value for slider
- thumbTintColor : Change the color of your thumbColor
- trackTintColor : Change the color of your trackColor
- trackHighlightTintColor : Change track color between ranges
- roundness : Adjust the value between the circle and the rectangle from 1.0 to 0.0 (default 1.0 is a circle)
Swift Package Manager - Recommended
Swift 5.3 in Xcode 12 added support for assets in Swift Packages. You can just add RangeSlider package to your project by entering it's repository URL
https://github.com/DAEJINLIM/RangeSlider
Older versions of Swift and Xcode don't support RangeSlider via SPM.
RangeSlider is available under the MIT License.
