0

次の方法でシート(NSPanel)を実装しました。

- (void)showInWindow:(NSWindow *)mainWindow {
if (!finestra1)
    [NSBundle loadNibNamed:@"XibName" owner:self];

[NSApp beginSheet:finestra1 modalForWindow:mainWindow modalDelegate:nil didEndSelector:nil contextInfo:nil];
[NSApp runModalForWindow:finestra1];   //This call blocks the execution until [NSApp stopModal] is called

}

シートが画面の中央に表示されます。それをメイン ウィンドウの上部に取り付けて、代わりに「スライド ダウン」効果で表示するにはどうすればよいですか?

前もって感謝します。

4

2 に答える 2

2

単に-runModalForWindow:行を削除しようとしましたか?

于 2012-12-17T23:17:05.763 に答える
0

私が教えられた方法では、提示しているシートは NSPanel ではなく NSWindow である必要があります。

簡単なデモ プロジェクトのアップロードをご希望の場合はお知らせください。

于 2012-12-17T18:21:01.080 に答える