Re: Custom path animation for CAShapeLayer
Re: Custom path animation for CAShapeLayer
- Subject: Re: Custom path animation for CAShapeLayer
- From: Matt Neuburg <email@hidden>
- Date: Mon, 10 Jan 2011 12:22:33 -0800
On Sat, 08 Jan 2011 00:07:17 +0000 (GMT), Kenneth Baxter <email@hidden> said:
>
>Hi, I'm trying to use a CAShapeLayer for some paths in my application. For the most part this works fine, but in some circumstances the animation from one path to another looks really strange during the animation.
>
>I would be able to tell it what the path should be at any intermediate point in the animation, but I'm not sure how to get access to it to provide those paths.
>
A path is not a concept that has a natural and obvious interpolation, so I presume you'd need to do the whole animation explicitly e.g. as a keyframe animation. Or maybe you could sort of cheat and animate some other property; you can create your own animatable property such that when you set it, your drawInContext: is called over and over as the value changes, so you could take that opportunity to redraw the path appropriately. m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________
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