Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

How to disable user input and just display the rating?

Open ariff20 opened this issue 8 years ago • 4 comments

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?

ariff20 avatar Apr 03 '16 13:04 ariff20

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.

gerbiljames avatar Apr 03 '16 19:04 gerbiljames

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

evgenyneu avatar Apr 04 '16 06:04 evgenyneu

I got this error:

'updateOnTouch' is inaccessible due to 'internal' protection level

afrade avatar Aug 13 '20 19:08 afrade

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?

DemoCosmos.zip

evgenyneu avatar Aug 14 '20 02:08 evgenyneu