I am designing a custom button with that requires me to overlay a UIButton
on top of a UIImageView
. The UIImageView
uses a [UIImage stretchableImageWithLeftCapWidth:topCapHeight:]
image and the UIButton
has a background color with a pattern image [UIColor colorWithPatternImage:[UIImage imageNamed:@"buttonPattern.png"]]
The problem I am facing is that on iPhone 4, the images from the UIButton
and the UIImageView
appear to have slightly different colors although they should match. Testing the same thing on an iPhone 3GS shows normal results without the color difference.
This image shows the difference:
as you can see it looks fine on the 3GS. On the retina display you can clearly see the difference in color. I even tried using the low res images (from the 3GS) on the retina display, the colors were still showing differently. is this a bug in retina display devices? has anyone faced this issue before?
Make sure none of your image files has an embedded color profile. This can be tricky. For Adobe software, this page is helpful:
http://bjango.com/articles/photoshop/
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