Skip to content

trafi/RatingSlider

Repository files navigation

Swift Package Manager compatible Carthage compatible

RatingSlider

Main example

Custom view for rating input. Try it out in an example playground .

Features

🔍
Tap Tap example
Pan Pan example
nil Nil example

Usage

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

Installation

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"