views:

96

answers:

1

What is the basic principles of doing complex animations on an NSWindow? I'd like to mimic the Quick Look window animation (grow/shrink) but haven't found anything on this.

Animating views is well documented but nothing on NSWindow. If you look closely at the Quick Look window, you'll see that it doesn't change the frame size, but really starts from a tiny window to the full size representation.

So far what I thought of doing is take a screenshot of the window, put that screenshot into a borderless window content view so that I can pretend that the window is animating. Once the animation is complete, hide that temporary window and show the "real" window.

There must be some more obvious way to accomplish this...

A: 

No obvious way. You have to animate the frame of the window yourself.

Ken Aspeslagh