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

add target for badge button #2

Closed
scubax07 opened this issue Feb 4, 2019 · 3 comments
Closed

add target for badge button #2

scubax07 opened this issue Feb 4, 2019 · 3 comments

Comments

@scubax07
Copy link

scubax07 commented Feb 4, 2019

Hi, how can I add target function for the badge when I click on it?
And thanks for this awesome library.

@rkrenecky
Copy link
Owner

Hi! Thanks for your feedback.
Unfortunately any interaction with the badge is not currently supported as there is no way to access the badge's view. What is your use case? Would making currentBadge property on BadgeController public instead of private solve your issue?

@scubax07
Copy link
Author

scubax07 commented Feb 5, 2019

Hi, again. Thanks for your response. I am making an MCQ app in which the badge button shows the number of answers selected, and also be submitted when the badge is clicked. I will let you know if I come up with a better solution or suggestions.

@rkrenecky
Copy link
Owner

Hi!

I just released new version of BadgeControl that contains changes that should solve your problems. You can now use currentBadge property on BadgeController to access the current badge (and you can for example attach a gesture recognizer to it so that you can click on it).

Also you can create your own BadgeImageView as the initializer is now public (unfortunately it's not possible to modify it after creation, if you need this behavior, feel free to open a PR!).

Let me know if this solves your issue!

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

2 participants