I have a split view that looks like:
| source | filter | list | detail |
I want to programmatically hide the filter so in my NSSplitView delegate I use
-(BOOL)splitView:(NSSplitView *)splitView shouldHideDividerAtIndex:(NSInteger)dividerIndex
To hide the filter section I am using
[[[[self splitView] subviews] objectAtIndex:1] setHidden:YES];
[[self splitView] adjustSubviews];
I have made the dividers red in my subclass to more easily see what is happening. Both dividers are still there - right next to each other, but the one on the right should disappear completely.
Is this happening because I am trying to hide a subview that is not at the edge? Perhaps it only works for index 0 and max?
How can I make this work?