Instance Method

splitView(_:constrainMinCoordinate:ofSubviewAt:)

Allows the delegate for sender to constrain the minimum coordinate limit of a divider when the user drags it.

Declaration

optional func splitView(_ splitView: NSSplitView, constrainMinCoordinate proposedMinimumPosition: CGFloat, ofSubviewAt dividerIndex: Int) -> CGFloat

Parameters

splitView

The split view that sent the message.

proposedMin

The proposed minimum coordinate limit of the subview, in the split view’s flipped coordinate system.

dividerIndex

Specifies the divider the user is moving, with the first divider being 0 and increasing from top to bottom (or left to right).

Return Value

The minimum coordinate limit of the divider.

Discussion

This method is invoked before the split view begins tracking the cursor to position a divider. You may further constrain the limits that have been already set, but you cannot extend the divider limits.

If the split bars are horizontal (views are one on top of the other), proposedMin is the top limit. If the split bars are vertical (views are side by side), proposedMin is the left limit. The initial value of proposedMin is the top (or left side) of the subview before the divider.

See Also

Constraining Split Position

func splitView(NSSplitView, constrainMaxCoordinate: CGFloat, ofSubviewAt: Int) -> CGFloat

Allows the delegate for sender to constrain the maximum coordinate limit of a divider when the user drags it.

func splitView(NSSplitView, constrainSplitPosition: CGFloat, ofSubviewAt: Int) -> CGFloat

Allows the delegate for sender to constrain the divider to certain positions.