I want to display a window as a sheet, which is perfectly running with the following code:
[NSApp beginSheet:mySheet
modalForWindow:myWindow
modalDelegate:nil
didEndSelector:NULL
contextInfo:NULL];
However, there is ONE LITTLE PROBLEM:
What's wrong? How could I fix that?
Just found it :
In the window's delegate, we implement window:willPositionSheet:usingRect:
like this
- (NSRect)window:(NSWindow *)window willPositionSheet:(NSWindow *)sheet
usingRect:(NSRect)rect
{
rect.origin.y += 11; // or as much as we need
return rect;
}