On Jul 11, 2008, at 5:38 AM, Cloud Strife wrote:

I am wondering whether I could set this property to NSColor or CGColor inorder to change the layer color dynamically. For example, If I want to change a Green layer to a red one from time to time, could anyone give me a
guidance?


CGColorRefs are Core Foundatation data types, and therefore analogous to NSObject decedents, thus you can typecast a CGColorRef to an id and assign it as a fromValue or toValue of a CAAnimation without needing to do any kind of conversion. Note however that NSColor and CGColorRef are NOT toll-free bridged, therefore it is an error to assign an NSColor where a CGColorRef is expected (or vise versa).
--
David Duncan
Apple DTS Animation and Printing
[EMAIL PROTECTED]



_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to