-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Change Color programmatically for dynamically created gauge. #18
Comments
Hi. I tried to change color and it works. You can try it by yourself by clonning this repo and switch to branch |
@francisadelante Ok, got it. It works for |
I am using half gauge I forgot to mention.Thanks for quick support. |
Fixed in |
I have it use the 0.2.4 version it is now working fine. Thank you so much |
You're welcome! :) On Tue, Jul 28, 2015 at 3:19 PM francisadelante notifications@github.com
|
Sure I will. :) |
Hi I am displaying the gauge in CellForRowAtIndexPath and I tried changing the color of gauge depending on its value this is my actual code of doing it
if result! > 0 && result! < 26 {
cell.gauge.startColor = UIColor.redColor()
cell.gauge.endColor = UIColor.redColor()
} else if result! > 25 && result! < 51 {
cell.gauge.startColor = UIColor.orangeColor()
cell.gauge.endColor = UIColor.orangeColor()
} else if result! > 50 && result < 76 {
cell.gauge.startColor = UIColor.yellowColor()
cell.gauge.endColor = UIColor.yellowColor()
} else {
cell.gauge.startColor = UIColor.greenColor()
cell.gauge.endColor = UIColor.greenColor()
}
but it doesn't seem to work it keeps displaying the color i set in mainStoryBoard. The
if condition
works fine it reads the code in each scenario but it doesn't render the color I need.The text was updated successfully, but these errors were encountered: