Instance Method

splitView(_:shouldCollapseSubview:forDoubleClickOnDividerAt:)

Invoked to allow a delegate to determine if a subview should collapse in response to a double click.

Declaration

optional func splitView(_ splitView: NSSplitView, shouldCollapseSubview subview: NSView, forDoubleClickOnDividerAt dividerIndex: Int) -> Bool

Parameters

splitView

The split view that sent the message.

subview

The subview to collapse.

dividerIndex

The index of the divider.

Return Value

true if the subview should collapse, false otherwise.

Discussion

If implemented, the delegate will receive this message once for the subview before a divider when the user double-clicks on that divider, and again for the subview after the divider, but only if the delegate returned true when sent splitView(_:canCollapseSubview:) for the subview in question. When the delegate indicates that both subviews should be collapsed NSSplitView's behavior is undefined.

See Also

Managing Subviews

func splitView(NSSplitView, resizeSubviewsWithOldSize: NSSize)

Allows the delegate to specify custom sizing behavior for the subviews of the NSSplitView sender.

func splitViewWillResizeSubviews(Notification)

Invoked by the default notification center to notify the delegate that the splitview will resize its subviews.

func splitViewDidResizeSubviews(Notification)

Invoked by the default notification center to notify the delegate that the splitview did resize its subviews.

func splitView(NSSplitView, canCollapseSubview: NSView) -> Bool

Allows the delegate to determine whether the user can collapse and uncollapse subview.

func splitView(NSSplitView, shouldAdjustSizeOfSubview: NSView) -> Bool

Allows the delegate to specify whether the subview should be resized.