I have a project that requires to load another xib file when a user press a button
In the main page of my project there are 6 buttons each is link to another xib (NSViewController)
When a user presses on a button it will show a nib file
Here's what I've done
-(IBAction)About:(id)sender {
self.aboutViewController = [[AboutViewController alloc]initWithNibName:@"AboutViewController" bundle:nil];
self.aboutViewController.view.frame = ((NSView*)self.window.contentView).bounds;
}
is this correct?
Please see my comment above but at a pure guess, I don't see [self.window.contentView addSubview:self.aboutViewController.view]
being called anywhere, so if your problem is that you're not seeing the view, that's at least one sure reason why.