What I need may be pretty basic, but I’m definitely not sure as to how to proceed (I’ve done that before but none of my choices seem that Cocoa-friendly).
Ok, let’s say we’ve got 2 NSViews – one next to the other:
- The one on the left serves as a menu.
- The one on the right will show a NSView (from a different XIB perhaps?) depending on the selection on the menu.

My questions :
- How should I go about loading the different
NSViews into the rightmost NSView? - How do I make sure that the subview (the one currently active) is properly resized when the window is resized?
rdelmar’s solution should work, but another approach, which may be simpler, is to use an NSTabView to handle switching between the content views. You can hide NSTabView’s tabs using the settings pane in interface builder, or by calling
[self.tabView setTabViewType:NSNoTabsNoBorder]. I’d probably use a table view for the left side. When the user selects a row, you do something like:The NSTabView can/will take care of properly resizing its content views as long as you’ve set up its and its content views’ autoresizing masks (springs and struts) properly.