Skip to content

DAEJINLIM/RangeSlider

Repository files navigation

RangeSlider

Default range slider made in Swift
The default value is similar to the swift slider.

Simulator Screen Recording - iPhone 15 Pro - 2023-11-09 at 00 40 48

Use

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)

Configuration

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)

Installation

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.

Creator

DAEJIN LIM

License

RangeSlider is available under the MIT License.

About

Custom range slider made in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages