Cosmos
Cosmos copied to clipboard
How to disable user input and just display the rating?
I would like the rating property to be calculated rather than being set by the user . How do I disable user input on the stars?
Setting userInteractionEnabled
to false
(NO
in Objective-C) on your instance of CosmosView
will prevent any interaction with it by the user. You can also do this through storyboard by unticking User Interaction Enabled
in the attributes inspector.
Thanks @gerbiljames for the solution. I have not provided clear documentation on that, sorry @ariff20. You are not the first person who asked this question. I have updated the readme, I hope it is more clear now.
There is another way of stopping user input:
cosmosView.settings.updateOnTouch = false
I got this error:
'updateOnTouch' is inaccessible due to 'internal' protection level
Thanks for reporting the issue @afrade I could not reproduce the bug unfortunately, see the demo app attached. Maybe there is something specific to your code that is causing the problem?