NSPanelのみを含むxibファイルがあります。このパネルをモーダルシート(with beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:
)として表示しようとしています。このxibのファイルの所有者は、NSPanelへのIBOutletを持つコントローラークラス「MyController」です。
私が探しているのは次のようなものです。
...
MyController *controller = [[MyController alloc] init];
[NSApp beginSheet:controller.panel modalForWindow:[NSApp mainWindow] modalDelegate:controller didEndSelector:nil contextInfo:nil];
...
質問:MyControllerはまたはから継承する必要がありますNSWindowController
かNSObject
?試しNSWindowController
てみましたが、いつもinitWithWindowNibName:
への出口はありません。NSPanel
ありがとう