Re: Help with simple NSView animation...
Re: Help with simple NSView animation...
- Subject: Re: Help with simple NSView animation...
- From: Matt Neuburg <email@hidden>
- Date: Thu, 03 Mar 2011 09:57:22 -0800
On Thu, 03 Mar 2011 10:54:32 -0300, Carlos Eduardo Mello <email@hidden> said:
>Just in case someone was following...
>
> As I couldn't figure out a simple way to animate my view growing
>while drawing (my drawing needs to be updated for each step of the
>way, depending on the view's size...), as a workaround I hid the view
>out of sight by embeding it in a dumb transparent view and animated it
>comming into sight instead of growing into sight. The result was
>actually pretty good (maybe even better than the initial idea).
>
Your "growing-while-drawing" problem is simply a special case of wanting to animate your own custom property. If you define your own animatable property, then your drawLayer:inContext: is called at each "frame" of the animation, giving you a chance to redraw. So, you could change your frame plus a custom animatable property, and they will be animated together (and therefore you'll get to redraw the presentation layer on every frame) when the redraw moment arrives and the animation is actually performed. m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________
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