私のcocoa OS Xアプリケーションでは、xibファイルを含むWindowControllerと、xibファイルを含む2つ のViewControllerがあります.WindowControllerにカスタムビューを追加しました。ここで、クリックしたときにそれらのビューを削除して追加することにより、これら2つのサブビューを交換しています続行または次へボタン。
[[theViewController view] removeFromSuperview];
self.theViewController = [[WelcomeInstallViewController alloc] initWithNibName:newView bundle:nil];
[innerInstallerView addSubview:[theViewController view]];
[[theViewController view] setFrame:[innerInstallerView bounds]];
これらのビューの 1 つに、WindowController の [続行] ボタンを無効にする必要があるボタンがあります。NSNotificationCenter を使用する必要がありますか? 私は混乱していて、正しく理解していませんでした。