Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIColor blendedColorWithForegroundColor Bug with iOS7.1 #141

Open
ngaje opened this issue Mar 15, 2014 · 1 comment
Open

UIColor blendedColorWithForegroundColor Bug with iOS7.1 #141

ngaje opened this issue Mar 15, 2014 · 1 comment

Comments

@ngaje
Copy link

ngaje commented Mar 15, 2014

FUISwitch and UIColor return "shades of grey" with blendedColorWithForegroundColor in iOS7.1 - ON & OFF Foreground/Background colors return a blend of onWhite and offWhite. This is the section of code that prior to iOS7.1 did not appear to work or not sure of the purpose! Now it does in 7.1 - it returns shades of grey! Any suggestions on a fix for this - other than taking out the if{}'s?

if ([foregroundColor getWhite:&onWhite alpha:nil])
{
onRed = onWhite;
onBlue = onWhite;
onGreen = onWhite;
}
else
{
[foregroundColor getRed:&onRed green:&onGreen blue:&onBlue alpha:nil];
}
if ([backgroundColor getWhite:&offWhite alpha:nil])
{
offRed = offWhite;
offBlue = offWhite;
offGreen = offWhite;
}
else
{
[backgroundColor getRed:&offRed green:&offGreen blue:&offBlue alpha:nil];
}

screen shot 2014-03-16 at 11 11 38

@ngaje ngaje changed the title UIColor blendedColorWithForegroundColor returns grey colors with iOS7.1 UIColor blendedColorWithForegroundColor Bug with iOS7.1 Mar 17, 2014
@davidcollado
Copy link
Contributor

Hi,
Here is my take on this issue: davidcollado@d9f4e7a

Hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants