Need "suck into close button" animation

瀏覽次數:22 次
跳到第一則未讀訊息

Chris Adamson

未讀,
2010年9月6日 上午8:11:352010/9/6
收件者: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.

Thanks.

--Chris

Michael Tyson

未讀,
2010年9月6日 下午3:29:032010/9/6
收件者:cocoa-...@googlegroups.com
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,
Michael

Kevin Ballard

未讀,
2010年9月6日 下午3:50:352010/9/6
收件者:cocoa-...@googlegroups.com
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
回覆所有人
回覆作者
轉寄
0 則新訊息