Class

NSSplitView

A view that arranges two or more views in a linear stack running horizontally or vertically.

Declaration

@interface NSSplitView : NSView

Overview

A split view manages the dividers and orientation for a split view controller (an instance of the NSSplitViewController class.) By default, dividers are oriented horizontally so that sibling views are arranged vertically, from top to bottom, in the containing split view controller.

Divider indices are zero-based, with the leftmost or topmost divider (depending on the value of the vertical property) having an index of 0.

Topics

Customizing the Split View Behavior

delegate

The split view’s delegate.

NSSplitViewDelegate

The NSSplitViewDelegate protocol defines the optional methods implemented by delegates of NSSplitView objects.

Managing Split Items

NSSplitViewItem

An item in a split view controller.

Managing Subviews

- adjustSubviews

Adjusts the sizes of the split view’s subviews so they (plus the dividers) fill the split view.

- isSubviewCollapsed:

Returns whether the specified view is collapsed.

- holdingPriorityForSubviewAtIndex:

Returns the priority of the subview’s width or height when resizing.

- setHoldingPriority:forSubviewAtIndex:

Sets the priority under which split view subviews maintain their width or height.

Managing Divider Orientation

vertical

The geometric orientation of the split view's dividers, where YES results in vertical dividers and side-by-side views.

Configuring and Drawing Dividers

dividerStyle

The style of divider drawn between views.

dividerColor

The color of the dividers that the split view draws between subviews.

dividerThickness

The thickness of the dividers for the split view.

- drawDividerInRect:

Draws a divider between two of the receiver’s subviews.

Saving Subview Positions

autosaveName

The name under which split view’s divider configuration is automatically saved.

Constraining Split Position

- minPossiblePositionOfDividerAtIndex:

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

- maxPossiblePositionOfDividerAtIndex:

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

- setPosition:ofDividerAtIndex:

Sets the position of the divider at the specified index.

Configuring Pane Splitters

- isPaneSplitter

Returns YES if the receiver’s splitter is a bar that goes across the split view. Returns NO if the splitter is a thumb on the regular background pattern.

Deprecated
- setIsPaneSplitter:

Sets the type of splitter.

Deprecated

Constants

NSSplitViewDividerStyle

These constants specify the possible divider styles used by NSSplitView and NSSplitView.

Notifications

NSSplitView declares and posts the following notifications. In addition, it posts notifications declared by its superclass, NSView. See the NSView class specification for more information.

NSSplitViewDidResizeSubviewsNotification

Posted after an NSSplitView changes the sizes of some or all of its subviews.

NSSplitViewWillResizeSubviewsNotification

Posted before an NSSplitView changes the sizes of some or all of its subviews.

Relationships

Inherits From

See Also

Split View Interface

NSSplitViewController

An object that manages an array of adjacent child views, and has a split view object for managing dividers between those views.

NSSplitViewItem

An item in a split view controller.