SteppableSlider
is a custom UISlider that provides step.
RxSwift
is supported.- Support
Haptic feedback
on.valueChanged
.
You can use SteppableSlider
with code or storyboard. Its fully compatible for interface builder.
import SteppableSlider
let slider = SteppableSlider()
slider.numberOfSteps = 4
slider.addTarget(self, action: #selector(sliderValueChanged(_:)), for: .valueChanged)
@objc func sliderValueChanged(_ sender: SteppableSlider) {
print(sender.currentStepIndex) // 0 ~ 3
}
import RxSteppableSlider
let slider = SteppableSlider()
slider.numberOfSteps = 4
slider.rx.currentIndex
.subscribe(onNext: { [weak self] index in
print(index) // 0 ~ 3
})
.disposed(by: disposeBag)
pod 'SteppableSlider', '~> 0.1.1'
or
pod 'SteppableSlider/RxSwift', '~> 0.1.1'
https://github.com/Mildwhale/SteppableSlider.git
or
dependencies: [
.package(url: "https://github.com/Mildwhale/SteppableSlider.git")
]
- iOS 10.0+
- Swift 4+