• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: any other type of value for the "fromValue" property of CAAnimation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: any other type of value for the "fromValue" property of CAAnimation?


  • Subject: Re: any other type of value for the "fromValue" property of CAAnimation?
  • From: David Duncan <email@hidden>
  • Date: Fri, 11 Jul 2008 14:41:12 -0700

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@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >any other type of value for the "fromValue" property of CAAnimation? (From: "Cloud Strife" <email@hidden>)

  • Prev by Date: Re: Search NSString for a word and get a boolean value
  • Next by Date: Re: KVO notifications and threads
  • Previous by thread: any other type of value for the "fromValue" property of CAAnimation?
  • Next by thread: Creating MetaPackages using PackageMaker 3 on 10.5
  • Index(es):
    • Date
    • Thread