I have a UIImage
that is a small symbol that is all black. The UIImage
is getting set in a custom UIButton
subclass I have. Is it possible to have the image to apply the tintColor
to it, so instead of the black image it changes colors to whatever the tintColor
is?
I'm just trying to avoid creating new assets.
// here I want defaultImageName (that is black) to use the tintColor (that is white)
[self setImage:[UIImage imageNamed:defaultImageName] forState:UIControlStateNormal];
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…