SteppableSlider
is a custom UISlider that provides step.
RxSwift
is supported.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")
]
link |
Stars: 4 |
Last commit: 5 days ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics