Custom view for rating input. Try it out in an example playground .
✨ | 🔍 |
---|---|
Tap | |
Pan | |
nil |
Just initialize RatingSlider
and add to view hierarchy as any other UIView
. Customize it:
let slider = RatingSlider()
slider.range = 0...10
slider.font = .systemFont(ofSize: 12)
slider.activeLabelsColor = .white
slider.activeTrackColor = .blue // setting `tint` does the same
slider.inactiveLabelsColor = .gray
slider.inactiveTrackColor = .lightGray // maps to `background` property
Open your project in Xcode and select File > Swift Packages > Add Package Dependency. There enter https://github.com/trafi/RatingSlider
as the repository URL.
Add the following line to your Cartfile
:
github "Trafi/RatingSlider"