views:

54

answers:

1

Hi,

I had a question when showing sheets in Cocoa and particularly, the animations. How do I show a sheet (plain NSWindow/NSPanel) with and without the nice animation? It does this automatically for NSSavePanel/NSOpenPanel, but I can't get the nice animation working for a standard NSWindow/NSPanel sheet I create in Interface Builder. (When I say animation, click on the "Show Cookies" button in the 'Security' tab in the Safari preferences)

Thanks, Rebecca.

+1  A: 

You cannot control whether there is an animation or not: sheets are always shown with an animation. The only thing that can change is the style of animation:

  • If the sheet is smaller than the window, it appears to slide down
  • If the sheet is larger than the window, it grows (in a trapeze shape) while sliding down.

You can make some tests, by resizing the window to be smaller or larger than the sheet.

Laurent Etiemble
Oh, that's what I was looking for. Thanks! Though, can you point to where it says this in the documentation? Thanks again Laurent!
Rebecca Morgan
The animation difference is not well documented. All that I found is in the Humain Interface Guide from Apple (http://developer.apple.com/Mac/library/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/XHIGWindows.html#//apple_ref/doc/uid/20000961-TPXREF12)
Laurent Etiemble