Search code examples
cocoacore-animationnswindowflip

Flipping a Window in Cocoa


How can I flip an NSWindow so I can press a button, and the window will "flip" like on Dashboard and the content view of the NSWindow changes.


Solution

  • Step 1: Center the window on a vertically-aligned fulcrum.
    Step 2: Push down on one side.

    OK, that's not it. ☺

    Mike Lee wrote one and put it in the public domain, and Drew McCormack improved it. Rainer Brockerhoff wrote one, too, and put his under an MIT license. So you have your choice.