OOOOOOO how could I forget that... grrr..

thanks !

:D
On Jul 29, 2009, at 1:52 PM, 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.


On 2009-07-29, at 6:34 AM, Gustavo Pizano wrote:

Hello, well I found the reason of the exception. But still they color its not being changed.... if I put [UIColor blueColor] then it works, but it doesn't work with RGB doing [[UIColor alloc] initWithRed ...... ] I tried also [UIColor colorWithCGColor:CGColorCreateGenericRBG(....)]; but the compiler just decided to send error that the method CGColorCreateGenericRGB its unreachable, even I have the CoreGraphics library in the project and im importing in in the file... dunno what to do.. I need to be very accurate with the color that im setting, I know the values in rgb but why is not working?


Thnaks
Gustavo Pizano



On Jul 29, 2009, at 11:29 AM, Gustavo Pizano wrote:

Hello.

Im trying to change the color of a UIView programatically but something is wrong.


Im pressing a button which triggers an IBAction, which does the following:

[[self view] setBackgroundColor:[UIColor colorWithRed:20.0 green: 10.0 blue: 30.0 alpha:1.0]];

but when I press the button the program blows with an NSInvalidArgumentException..

what am I doing wrong?


thanks

Gustavo Pizano




_______________________________________________

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/bwalkin%40gmail.com

This email sent to bwal...@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