Reputation: 9071
My iOS app creates a light blue color to use as the background of a table cell, like this:
UIColor *bgColor = [UIColor colorWithRed:0/0.0 green:115/255.0 blue:140/255.0 alpha:1.0];
Since the release of iOS 10, two users have sent screen shots showing that this color is rendering as pink. I did a comparison in Photoshop and found that the pink color is what I'd get with the RGB values above if the blue value was changed to 0. So it seems that somehow the blue value is getting lost when I create the color. This doesn't seem to happen with any other colors in the app, and I compared the code and I'm creating the other colors the same way.
The devices where the problem occurred were an iPhone 6s and an iPhone SE, both newer than my newest devices. The problem doesn't occur on my iPhone 6 or iPad Air 2.
Strangely, I used to occasionally see this happen in the iOS Simulator in Xcode 7 and earlier, but I ignored it because it seemed like a quirt of the simulator. Now it doesn't happen in the Xcode 8 simulator, but this is the first time I'm aware that it has ever happened on a real device.
I see that some changes were made to the colorWithRed:green:blue:alpha: method in iOS 10, and to color rendering in general, but my values aren't out of range. I'll report a bug to Apple, but in the meantime can anyone suggest an explanation for this?
Upvotes: 0
Views: 315