Objective c 起始页modalForwindow:零位置?

Objective c 起始页modalForwindow:零位置?,objective-c,cocoa,cocoa-sheet,Objective C,Cocoa,Cocoa Sheet,我想知道怎么做 - (void)beginSheet:(NSWindow *)sheet modalForWindow:(NSWindow *)docWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo 选择我的窗口上的位置,因为它是无窗口的模态?(我将nil传递给'modalForWindow:) 第一个位置是在Interface bu

我想知道怎么做

- (void)beginSheet:(NSWindow *)sheet modalForWindow:(NSWindow *)docWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo
选择我的窗口上的位置,因为它是无窗口的模态?(我将
nil
传递给'modalForWindow:)

第一个位置是在Interface builder中定义的位置。一旦我第一次关闭它,每次重新打开它,它都会在屏幕的上半部分居中。不可能总是在同一个位置打开它吗


thx

如果您只想显示模式窗口,请使用
-[NSApplication runModalForWindow:


如果只想显示模式窗口,请使用
-[NSApplication runModalForWindow:


如果您实际上不需要工作表,请不要使用
-beginSheet:…
。那么您对模式窗口有何建议?如果您实际上不需要工作表,请不要使用
-beginSheet:…
。那么您对模式窗口有何建议?