1

The basis of my problem is that when I resize my window, the left pane of my split view resizes and the right side keeps a fixed width, i'd like it to work the other way around.

If I try to move the split divider to make the right side bigger, it snaps back.

I add the SplitView items in my NSSplitViewController subclass like this:

// Add a new SplitViewItem with list view
if (self.tabView == nil)
{
    self.tabView = [self.storyboard instantiateControllerWithIdentifier:@"ListTabView"];
}

[self addChildViewController:self.tabView];
NSSplitViewItem *slSplitView = [self splitViewItemForViewController:self.tabView];
[slSplitView setCanCollapse:NO];
[slSplitView setHoldingPriority:260];

if (self.mediaview == nil)
{
    self.mediaview = [self.storyboard instantiateControllerWithIdentifier:@"MediaView"];
}

[self insertChildViewController:self.mediaview atIndex:1];
NSSplitViewItem *slSplitViewMedia = [self splitViewItemForViewController:self.mediaview];
[slSplitViewMedia setCanCollapse:NO];
[slSplitViewMedia setHoldingPriority:251];

The subviews in my mediaView have their widths set to >=400 so that's not the issue.

Darren
  • 10,182
  • 20
  • 95
  • 162
  • It sounds like the auto layout constraints in the right side view result in a fixed size. For example, you have a button or something that's constrained like `|-[button]-|` and the button's content hugging priority is high. That would make the total width of the view fixed at just a bit wider than the button at high priority. Make sure the constraints on the view are flexible enough to allow it to resize. – Ken Thomases May 10 '15 at 15:49
  • It contains 2 views and both are set with edges 0 to superview so they stay the same size as the view. And width/height set to >=400 to set a minimum. I don't believe these would set a fixed width. – Darren May 10 '15 at 15:53

0 Answers0