evgenyneu / Cosmos

A star rating control for iOS/tvOS written in Swift
MIT License
2.19k stars 368 forks source link

Cosmos does not show half-filled stars #91

Open a-v-ebrahimi opened 6 years ago

a-v-ebrahimi commented 6 years ago

Hi

Why Cosmos doesn't sem-fill stars, please check this,thanks : image

evgenyneu commented 6 years ago

Thanks for the question, @ControlAdad. One can set 1 for "half-fill" or 2 for "precise" in the "Fill Mode" setting. By default it uses 0 for displaying full stars.

Alternatively, one can change the fill mode from code:

cosmosView.settings.fillMode = .half
// Other fill modes:  .precise, .full

Please let me know if it works for you.

a-v-ebrahimi commented 6 years ago

Thank you!

osrl commented 5 years ago

even works with custom images. thanks

sanvis1212 commented 4 years ago

Thank you

veer-trupti commented 1 year ago

Fillmode precise doesn't work if I give totalStars as 1. Doesn't work on single star.