I set a UIColor
using rgb to a background of a UILabel
. I'm trying to adjust the alpha
only. How can I modify the alpha of an existing rgb UIColor
?
Edit
Basically I have UILabels
that have a set UIColor
(using rgb), and I won't know what color the UILabels
are. At a certain point, I will have to change the labels
alpha`. How can I just change the labels color alpha?
colorWithAlphaComponent:
did the trick.
So what I had to do was:
self.mylabel.backgroundColor = [self.myLabel.backgroundColor colorWithAlphaComponent:0.3];