In fact I did slap in my head when I realized about the argumetns, after reading the first reply..

big DUH for me .


Thanks for all the suggestions.

G.
On Jul 29, 2009, at 6:56 PM, David Duncan wrote:

On Jul 29, 2009, at 4:52 AM, Brandon Walkin wrote:

The arguments to that UIColor method should be in the range of 0 to 1. Divide each RGB value by 255 to get them into that range.


This is more of a PSA than anything (because I've seen more than a fair share of devs slap themselves on the head here too): Always ensure your using floating point division if your going to do this. That means always dividing by 255.0. I've seen too many people asking "why do I always get black" and pointed out "because you forgot the .0" :).
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/gustavxcodepicora%40gmail.com

This email sent to gustavxcodepic...@gmail.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to