Instance Method

maxPossiblePositionOfDivider(at:)

Returns the maximum possible position of the divider at the specified index.

Declaration

func maxPossiblePositionOfDivider(at dividerIndex: Int) -> CGFloat

Parameters

dividerIndex

The index of the divider.

Return Value

A CGFloat specifying the maximum possible position of the divider.

Discussion

The position is "possible" in that it is dictated by the bounds of the receiver and the current position of other dividers. "Allowable" positions are those that result from letting the delegate apply constraints to the possible positions.

You can invoke this method to determine the range of values that can be usefully passed to setPosition(_:ofDividerAt:).

You can also invoke it from delegate methods like splitView(_:constrainSplitPosition:ofSubviewAt:) to implement relatively complex behaviors that depend on the current state of the split view.

The results of invoking this method when adjustSubviews() has not been invoked, and the subview frames are invalid, is undefined.

See Also

Constraining Split Position

func minPossiblePositionOfDivider(at: Int) -> CGFloat

Returns the minimum possible position of the divider at the specified index.

func setPosition(CGFloat, ofDividerAt: Int)

Sets the position of the divider at the specified index.