On Thu, 03 Mar 2011 10:54:32 -0300, Carlos Eduardo Mello 
<[email protected]> 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 protected], <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 protected])

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