My application uses a NSSplitViewController to which I add NSSplitViewItems after NIB load. I have three items and want the third to be collapsed by default. I also want new windows to restore the split view to an autosaved configuration.
What works fine on Yosemite: Create and add the items in viewDidLoad of my NSSplitViewController subclass. On the third item I set .collapsed = YES. I set the autosaveName on NSSplitView once all items are added.
The split view loads with the default configuration: 2 items visible, 1 collapses. If an autosave configuration exists, it is applied.
Running the same binary on El Capitan, this works only for items that are not collapsed by default. The third item where .collapsed = YES is always collapsed.
Example:
NSSplitViewItem *previewSplitViewItem = [NSSplitViewItem splitViewItemWithViewController:previewViewController];
previewSplitViewItem.holdingPriority = 270;
previewSplitViewItem.canCollapse = YES;
previewSplitViewItem.collapsed = YES;
[self addSplitViewItem:previewSplitViewItem];
[self.splitView setAutosaveName:@"Document Split View"];
When compiled against 10.10 SDK and run on 10.10, previewSplitViewItem is collapsed or not according to user defaults saved under "NSSplitView Subview Frames Document Split View". Running the same binary on 10.11.2 beta, previewSplitViewItem is always collapsed.