edonv/ratingcontrol
`RatingControl` is a SwiftUI "rating" control (pretty self-explanatory). Anything can be used for empty and filled images (they can really be any type of view, not just `Image`s).
To-Do's
- [x] Figure out how to do partial values
- change bound value from Int to Double (use Slider's initializers as reference for generic number) - use .mask modifier? - make sure to take into account padding - [x] figure out decimal maximumValues
- [ ] for
.dynamicsizing mode: maybe solution is to make an actualViewModifierwith a @State var that reads preferencekey changes and calculates the masking scale and calc's the frame width? - [ ] add tvOS exclusive modifier that specifies stride/increment
- [ ] also maybe replace Button with some sort of custom tvOS control where just pressing left/right changes the value by the increment
- [ ] add tappable increment via modifier
- [ ] add increment value to inits or environmentvalue
- this would affect dragging. if it's nil, full decimal values. otherwise, snap to values - also maybe alternate initializer that takes Binding<Int>?
Package Metadata
Repository: edonv/ratingcontrol
Default branch: main
README: README.md