• 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: animating a non-interpolated view property and totally confused
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: animating a non-interpolated view property and totally confused


  • Subject: Re: animating a non-interpolated view property and totally confused
  • From: David Duncan <email@hidden>
  • Date: Wed, 13 Feb 2008 18:26:17 -0800

On Feb 13, 2008, at 6:07 PM, Nathan Vander Wilt wrote:

My understanding is that in this case I need to
implement animationForKey: in my NSView subclass,
which must return an instance of CAAnimation. But it's
NSAnimation that has all the features I'm after, and
it's a subclass of NSObject that couldn't pose as a
CAAnimation. So I guess the CAAnimation would have my
view instance set as a delegate, and I'd need to make
my view's animationDidStart: delegate method start an
NSAnimation instance?

What you need to do is implement a "squareness" property on your view that basically says how far you are between Square and Circle. When you are asked to animate, you return a CABasicAnimation - you don't need to modify it at all, just let setTypeOfObject do the work for you to either say Square or Circle as the extreme of your "squareness" property.


Then you will just be called periodically to draw, with "squareness" linearly interpolated between the starting and ending value. As long as you can draw the intermediate interpolations, you'll see your animation progress.
--
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


  • Follow-Ups:
    • Re: animating a non-interpolated view property and totally confused
      • From: Nathan Vander Wilt <email@hidden>
References: 
 >animating a non-interpolated view property and totally confused (From: Nathan Vander Wilt <email@hidden>)

  • Prev by Date: Changing Framework's Location
  • Next by Date: Re: Changing Framework's Location
  • Previous by thread: animating a non-interpolated view property and totally confused
  • Next by thread: Re: animating a non-interpolated view property and totally confused
  • Index(es):
    • Date
    • Thread