I am trying to open a sheet window on my cocoa application:
MyWindowController *controller = [[MyWindowController alloc] init];
NSWindow *window = [NSApp mainWindow];
[NSApp beginSheet:controller.window modalForWindow:window modalDelegate:self didEndSelector:nil contextInfo:nil];
The problem is that the sheet is not attached to the current window, but is shown in the lower left corner of the screen. I tried using the self.view window, but nothing changed. What should I do to place the sheet in the top window of my window?
source
share