Xcode 8.2.1, Swift 3.0.2, macOS 10.12
I have an NSSplitViewController
that has 3 panes (please note the NS
; this is for a Mac app).
I'm trying to set the left-most pane to always have a fixed width and not be resizable. I have tried the following:
- For some reason, auto layout constraints are not available in the Storyboard editor on the child view of the pane.
- Setting
constrainMaxCoordinate
andconstrainMinCoordinate
didn't work.
Has anyone else gotten this to work lately? There are lots of articles about this topic, but their toolsets are several years old and none of their suggestions have worked for me. Thanks!
I finally figured this out. I had to set an auto layout constraint programmatically. Setting a constraint on an
NSSplitViewItem
was not available in the storyboard editor (Xcode 8.1).Here's how I did it:
I hope that helps someone else.