1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NSWindowControllerのwindowをsheetとして呼び出す時には`Visible At Launch`のチェックを外す。

Posted at

xib付きのNSWindowControllerをsheetとして別のwindowから呼びだそうとした時sheetとして呼び出されず別のwindowで開いてしまっていた。

私は、base windowのタイトルバーのところからニュっと降りてくるようにしたかった。

原因を調べている内に呼び出される側のxibファイルでwindowを選択し
window > Behaivior > Visible At Launch のチェックを外してみたらうまく行った。

 _webWindowController = [[WebWindowController alloc] initWithWindowNibName:@"WebWindowController"];
 [NSApp beginSheet:_webWindowController.window
       modalForWindow:self.window
        modalDelegate:self
       didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
          contextInfo:@"login webview close"];
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?