GraduatedSlider
A UISlider-like control with graduations (e.g. like sliders on DJ decks), can be used vertically or horizontally, optional haptic feedback
Features
- IBInspectable
- Customizable graduations and cursor colors
- Customizable range
- Optional haptic feeback
- Horizonal or vertical
Usage
let slider = GraduatedSlider()
slider.minimumValue = 0
slider.maximumValue = 100
slider.addTarget(self, action: #selector(onValueChanged(_:)), for: .valueChanged)
slider.addTarget(self, action: #selector(onSliderTouchEnded(_:)), for: . touchUpInside)
Vertical / horizontal orientation
slider.isHoritontal = true // default false
Requirements
- iOS 10.0+
- Xcode 10
Installation
Swift Package Manager:
dependencies: [
.package(url: "https://github.com/sardon/GraduatedSlider", from: "1.0.0")
]