Re: Help with simple NSView animation...
Re: Help with simple NSView animation...
- Subject: Re: Help with simple NSView animation...
- From: Carlos Eduardo Mello <email@hidden>
- Date: Thu, 03 Mar 2011 15:52:22 -0300
Hi Matt,
thanks for the reply. I 'll definetly dig into that as soon as I am
done with core GUI stuff (need to get my app working for a -prototype
demo)...I was trying to add a quick touch of animation so that my demo
would look cooler and just thought that it might be possible to do it
with NSView calls without using layers, I mean, using the animator.
I'll go through the Core Animation Guide to get a better handle on
CALayer, etc.
Thank You again for your time.
On Mar 3, 2011, at 2:57 PM, Matt Neuburg wrote:
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