Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change rating by tapping, not by dragging? #156

Open
yeonpark333 opened this issue Jan 22, 2020 · 4 comments
Open

How to change rating by tapping, not by dragging? #156

yeonpark333 opened this issue Jan 22, 2020 · 4 comments

Comments

@yeonpark333
Copy link

I am trying to make my star rating get the rate by tapping, not by dragging for user experience.
But I cannot find any code for this.
Is there anyone who can help me?
Thank you in advance!

@evgenyneu
Copy link
Owner

Hi @yeonpark333, thanks for reporting, it must be a bug in Cosmos because tapping should change the stars see demo app.

@yeonpark333
Copy link
Author

Is it because i put the cosmos in collectionview?

@evgenyneu
Copy link
Owner

Probably, the demo app includes a screen with Cosmos in a table view, which is similar to collection view.

Have you tried this:

https://github.com/evgenyneu/Cosmos/wiki/Using-Cosmos-in-a-scroll-view

@djdance
Copy link

djdance commented Feb 3, 2022

to make it work in tableview, simply add this in cell

let gestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(dummy))
        gestureRecognizer.cancelsTouchesInView = false
        addGestureRecognizer(gestureRecognizer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants