How to get a green to show up like the charging battery on the iPhone lock screen?
Posted
by
tarheel
on Stack Overflow
See other posts from Stack Overflow
or by tarheel
Published on 2012-12-01T17:02:58Z
Indexed on
2012/12/01
17:03 UTC
Read the original article
Hit count: 207
I am trying to get a color to show up on screen just like the charging battery (shown here):
After looking at the Apple Documentation on UIColor
here, I have attempted using both colorWithHue:saturation:brightness:aplha:
and colorWithRed:green:blue:alpha:
to get a color to show up like that.
For example when I use colorWithHue:.3 saturation:.84 brightness:1 alpha:.5
on a black background, it renders a color like this:
or the colorWithRed:0 green:1 blue:0 alpha:.5
on a black background shows up like this:
It doesn't have that translucent or glossy look to it.
Is there a better method to use? Or do I just not have the values right? (I have tried many combinations)
© Stack Overflow or respective owner