i have a Vertical NSSplitView on my ViewController i set a Width constraint of >=200 for the left controller. This works in the sense that it won't let me size it less than two hundred. However if i expand the form it changes the size of both the Left & Right Views. I want it to default to changing only the Right view. So the user can increase the Left View if she wants but when they resize the form it only resizes the Right View.
Asked
Active
Viewed 1,153 times
2 Answers
4
You should change the holding priorities of the split panes.
These describe the priority at which the panes want to remain the same size, and are primarily used to describe which split pane should increase in size when the split view changes size.
They default to NSLayoutPriorityDefaultLow for each pane, but by setting the right pane to something lower (NSLayoutPriorityDefaultLow - 1) , you'll get the behavior where the right pane resizes, while the left one stays the same.

Cirec Beback
- 693
- 10
- 16

Taylor
- 3,183
- 17
- 18
-
how can i set the NSLayoutPriorityDefaultLow? – user3065901 Feb 03 '15 at 11:01
-
Not working.. is that because of other constraints in Split view item? – AJit Mar 30 '16 at 19:20
0
Did you implement the NSSplitViewDelegate? The delegate provides precise control over sizing, constraints etc.
See NSSplitViewDelegate
-splitView:shouldAdjustSizeOfSubview:
which will prevent the auto-resize

Jay
- 34,438
- 18
- 52
- 81