How to implement 3-layer NSSplitView with minimum and maximum dimensions?

I want to implement a NSSplitView3x vertical (very similar to Mail.app). I'm not sure where to start. I'm sure I need to implement NSSplitViewDelegate, but I'm not sure what methods and / or their implementation.

The layout I want is as follows:

+----------+------------------+------------------------------------+
|          |                  |                                    |
|          |                  |                                    |
|          |                  |                                    |
|          |                  |                                    |
|  Pane 1  |      Pane 2      |               Pane 3               |
|          |                  |                                    |
|          |                  |                                    |
|          |                  |                                    |
|          |                  |                                    |
|          |                  |                                    |
+----------+------------------+------------------------------------+

I want to implement the following restrictions for each of the panels:

  • Panel 1: minimum 140pt. Maximum: 400pt.
  • Panel 2: minimum 250pt.
  • Panel 3: at least 400pt.

Any pointers would be much appreciated.

+5
source share
4 answers

To ensure the minimum size, select the BESplitViewConstraintEnforcer utility class that we created.

: Interface Builder, , .

Screenshothot

+7

, HTH Interface Builder, , . , - , , .

  • NSSplitView,
  • NSView ( IB) Split View. , , .

What it looks like in the IB Objects List

, NSSplitView , , . , , , , Simulator.

The result

+6

, . , . , splitview, , splitview (subview splitview).

Window 
Window containerview
        Splitview
            Containerview_left | containerview_right
                                    Splitview
                                        Containerview_left | containerview_right

, splitview, , . subviews splitview, [splitview addubview] , deviders. .

Window  Window containerview
         Splitview
             Containerview_ind(0)| Containerview_ind(1) | Containerview_ind(2)

, subview, , .

0

Xcode 8.2.1

  • Split View Controller Interface Builder.
  • View Controller.
  • Split View Controller View Controller.
  • split items.

.

0

All Articles