I have to imagine this has been asked several times, but I must not be wording my question correctly.
I have my own custom image I made in photoshop and it is set as a button's image property. Here it is showing normally:
The background is transparent, but it is 44x44 with the three dots being a 88x88 pixel .png file. So if I do something like this:
self.theButton.tintColor = [UIColor redColor];
the image still shows as white. I am not a designer by trade, so I seem to be missing how to properly save or set up the files to make them respect the tintColor property. In photoshop, I usually save these using "Save for web".
Thanks
UIImage *myImage = [UIImage imageNamed:@"myImageFile.png"];
myImage = [myImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
imageView.image = myImage;
imageView.tintColor = [UIColor greenColor] // or any other color you want
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With