Need "suck into close button" animation

Skip to first unread message

Chris Adamson

Sep 6, 2010, 8:11:35 AM9/6/10
to cocoa-unbound
Has anyone seen source for or a blog description of a "suck into close
button" animation like Dashboard widgets? Off the top of my head, it
seems like just setting the bounds to {(0,0) 0x0} and animating is
just going to perform a scale, but I can't quite envision what the
keyframes or control points would be for this animation.



Michael Tyson

Sep 6, 2010, 3:29:03 PM9/6/10
Hmm, in the absence of any other more helpful replies thus far, my two bob: Unless this is an out-of-the-box transition type, I can't imagine implementing this any other way than using GL: Copying the view as a texture onto a grid and deforming it appropriately.

You won't get the kind of control you need for a 'suck' animation with a standard CA transform, unfortunately, as far as I know!

Best of luck,

Kevin Ballard

Sep 6, 2010, 3:50:35 PM9/6/10
What platform are you targeting? If it's OS X, then there's some private CGS functions you can use to do the transition. If I recall correctly, there's one specifically for the genie suck animation, though you can use CGSSetWindowWarp() To do arbitrary animations as well. If it's iOS then as Michael said, you're going to have to use OpenGL.

-Kevin Ballard
Reply all
Reply to author
0 new messages