<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSplitView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSplitView"
  },
  "title" : "NSSplitView"
}
-->

# NSSplitView

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

```
class NSSplitView
```

## Overview

A split view manages the dividers and orientation for a split view controller ([`NSSplitViewController`](/documentation/AppKit/NSSplitViewController)). By default, dividers have a horizontal orientation so that the split view arranges its panes vertically from top to bottom.

Divider indices are zero-based. If the [`isVertical`](/documentation/AppKit/NSSplitView/isVertical) property is <doc://com.apple.documentation/documentation/Swift/false>, which is the default value, the top divider has an index of `0`. If [`isVertical`](/documentation/AppKit/NSSplitView/isVertical) is <doc://com.apple.documentation/documentation/Swift/true>, the leading divider has an index of `0`.

## Topics

### Customizing the Split View Behavior

[`delegate`](/documentation/AppKit/NSSplitView/delegate)

The split view’s delegate.

[`NSSplitViewDelegate`](/documentation/AppKit/NSSplitViewDelegate)

A set of optional methods that a delegate of a split view implements.

### Arranging Subviews

[`arrangesAllSubviews`](/documentation/AppKit/NSSplitView/arrangesAllSubviews)

A Boolean value that determines whether the split view arranges all of its subviews as split panes.

[`arrangedSubviews`](/documentation/AppKit/NSSplitView/arrangedSubviews)

The array of views that the split view arranges as its split panes.

[`-  addArrangedSubview:`](/documentation/AppKit/NSSplitView/addArrangedSubview(_:))

Adds a view as an arranged split pane.

[`-  insertArrangedSubview:atIndex:`](/documentation/AppKit/NSSplitView/insertArrangedSubview(_:at:))

Adds a view as an arranged split pane at the specified index.

[`-  removeArrangedSubview:`](/documentation/AppKit/NSSplitView/removeArrangedSubview(_:))

Removes a view as an arranged split pane.

### Managing Subviews

[`-  adjustSubviews`](/documentation/AppKit/NSSplitView/adjustSubviews())

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

[`-  isSubviewCollapsed:`](/documentation/AppKit/NSSplitView/isSubviewCollapsed(_:))

Returns whether the specified view is in a collapsed state.

[`-  holdingPriorityForSubviewAtIndex:`](/documentation/AppKit/NSSplitView/holdingPriorityForSubview(at:))

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

[`-  setHoldingPriority:forSubviewAtIndex:`](/documentation/AppKit/NSSplitView/setHoldingPriority(_:forSubviewAt:))

Sets the priority for split view subviews to maintain their width or height.

### Managing Divider Orientation

[`vertical`](/documentation/AppKit/NSSplitView/isVertical)

A Boolean value that determines the geometric orientation of the split view’s dividers.

### Configuring and Drawing Dividers

[`dividerStyle`](/documentation/AppKit/NSSplitView/dividerStyle-swift.property)

The style of divider between views.

[`DividerStyle`](/documentation/AppKit/NSSplitView/DividerStyle-swift.enum)

Constants that specify the style of the split view’s dividers.

[`dividerColor`](/documentation/AppKit/NSSplitView/dividerColor)

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

[`dividerThickness`](/documentation/AppKit/NSSplitView/dividerThickness)

The thickness of the dividers for the split view.

[`-  drawDividerInRect:`](/documentation/AppKit/NSSplitView/drawDivider(in:))

Draws a divider between two of the split view’s subviews.

### Saving Subview Positions

[`autosaveName`](/documentation/AppKit/NSSplitView/autosaveName-swift.property)

The name to use when the system automatically saves the split view’s divider configuration.

[`AutosaveName`](/documentation/AppKit/NSSplitView/AutosaveName-swift.typealias)

The type that specifies the split view’s autosave name.

### Constraining Split Position

[`-  minPossiblePositionOfDividerAtIndex:`](/documentation/AppKit/NSSplitView/minPossiblePositionOfDivider(at:))

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

[`-  maxPossiblePositionOfDividerAtIndex:`](/documentation/AppKit/NSSplitView/maxPossiblePositionOfDivider(at:))

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

[`-  setPosition:ofDividerAtIndex:`](/documentation/AppKit/NSSplitView/setPosition(_:ofDividerAt:))

Updates the location of a divider you specify by index.

### Managing Notifications

[`NSSplitViewWillResizeSubviewsNotification`](/documentation/AppKit/NSSplitView/willResizeSubviewsNotification)

A notification that posts before a change to the size of some or all subviews of a split view.

[`NSSplitViewDidResizeSubviewsNotification`](/documentation/AppKit/NSSplitView/didResizeSubviewsNotification)

A notification that posts after a change to the size of some or all subviews of a split view.

### Deprecated

[`-  isPaneSplitter`](/documentation/AppKit/NSSplitView/isPaneSplitter)

The type of pane splitter.

[`-  setIsPaneSplitter:`](/documentation/AppKit/NSSplitView/setIsPaneSplitter:)

Sets the type of splitter.

## Relationships

### Conforms To

[`NSAccessibilityProtocol`](/documentation/AppKit/NSAccessibilityProtocol)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Equatable`](/documentation/Swift/Equatable)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSAccessibilityElementProtocol`](/documentation/AppKit/NSAccessibilityElementProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSAnimatablePropertyContainer`](/documentation/AppKit/NSAnimatablePropertyContainer)

[`NSDraggingDestination`](/documentation/AppKit/NSDraggingDestination)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`NSAppearanceCustomization`](/documentation/AppKit/NSAppearanceCustomization)

### Inherits From

[`NSView`](/documentation/AppKit/NSView)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)