splitView(_:constrainMinCoordinate:ofSubviewAt:)
Allows the delegate to constrain the minimum coordinate limit of a divider when the user drags it.
Declaration
@MainActor optional func splitView(_ splitView: NSSplitView, constrainMinCoordinate proposedMinimumPosition: CGFloat, ofSubviewAt dividerIndex: Int) -> CGFloatParameters
- splitView:
The split view that sends the message.
- proposedMinimumPosition:
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
The delegate receives this message before the split view begins tracking the cursor to position a divider. You can further constrain the limits, but you can’t 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.