NSWindow添加NSViewController

大概这样,笔记一下,防止忘记

1 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
2 {
3     MyViewController* ctller = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
4     [self.window setContentView:ctller.view];
5     [ctller release];
6 }

 

你可能感兴趣的:(controller)