In Xcode 11.3.1, targeting macOS 10.12, a "master" NSViewController contains a @property (weak, nullable) IBOutlet NSView * contentView;. A non-root NSView from the corresponding XIB file is linked to this contentView property.
The goal is to dynamically load/show/switch different views depending on the application state. These views have corresponding pairs of NSViewController and XIB files.
I am trying to change the current view using this code:
InnerViewController * vc = [[InnerViewController alloc] initWithDefaultNib];
self.contentView = vc.view;
However, I do not see anything. I've double checked that vc.view is not nil.
Have I missed something? Is this the correct approach?