segunda-feira, 2 de maio de 2011

Quick Tip - IOS DEV - UIColor

This is a good fast tip for ios newbies (like me)....I was trying to use UIColor to create a color with RGB values like this:

But this natural approach is wrong and if you read Apple class reference here (as I did) you probably will realize that each color must be between 0 and 1....what a damn confusion uh Apple...

For those that didn't realize it before just divide it by 255 and everything goes well:

That's it folks!!!

Nenhum comentário: