I am developing an application which has an image and some buttons whose position remain unchanged during the entire flow. So I subclassed the NSViewController. This is the main view of my application with the fixed buttons and image. I add an NSBox item into which various subviews will be displayed and swapped in/out. How do I display the custom view on button click event in this box? I tried the following code:
intro = [[Introduction alloc] initWithNibName:@"Introduction" bundle:nil];
[intro setNextResponder:[self nextResponder]];
[self setNextResponder:intro];
[box setContentView:[intro view]];
But I get the following error: -[NSViewController loadView] loaded the "Introduction" nib but no view was set.
The File's Owner is set to Introduction class.