You would call it this way:
MyWindowController* controller = [[MyWindowController alloc] initWithWindowNibName:@"Foo"]; [controller showWindow:nil];
Where Foo is the nib file name, and MyWindowController is the NSWindowController subclass that you specified as the owner of the nib file.
In this case, it is important to subclass NSWindowController, because it will automatically search for the nib file in the package in which the class lives.
Ken aspeslagh
source share