NSSplitView: how to not resize with the window but only in "manual" way?

nssplitview, objective-c

Solution

In Xcode 4.6, The left custom view of the vertical split view is not NSScrollView.

@synthesize leftView;

- (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)subview {
    if (subview == leftView) return NO;
    else return YES;
}

Problem

I' ve a simple vertical `NSSplitView` and I wan't that keeps his size when I resize the windows but I want to allow the resize of the `NSSplitView` manually when dragging the vertical bar that divides the two views. EDIT. This is the code I' ve added and for some reason all goes wrong: the left pane (sourceView) keeps the same size while resizing the window but the right pane that has a correct auto layout constraints (works well without implementing the method below). The NSSrollView is the left pane that I wan' t to remain in the same position and the other view may resize with the window. ``` - (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)subview { if ([subview class] == [NSScrollView class]) return NO; return YES; } ``` Anyone know a fast solution to do that? Thanks!

Original source