Class

NSSplitView

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.

Overview

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

Symbols

Managing Subviews

func adjustSubviews()

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

func isSubviewCollapsed(NSView)

Returns whether the specified view is collapsed.

func holdingPriorityForSubview(at: Int)

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

func setHoldingPriority(NSLayoutPriority, forSubviewAt: Int)

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

Managing Divider Orientation

var isVertical: Bool

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

Assigning a Delegate

var delegate: NSSplitViewDelegate?

The split view’s delegate.

Configuring and Drawing Dividers

var dividerStyle: NSSplitViewDividerStyle

The style of divider drawn between views.

var dividerColor: NSColor

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

var dividerThickness: CGFloat

The thickness of the dividers for the split view.

func drawDivider(in: NSRect)

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

Saving Subview Positions

var autosaveName: String?

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

Constraining Split Position

func minPossiblePositionOfDivider(at: Int)

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

func maxPossiblePositionOfDivider(at: Int)

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

func setPosition(CGFloat, ofDividerAt: Int)

Sets the position of the divider at the specified index.

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.

static let NSSplitViewDidResizeSubviews: NSNotification.Name

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

static let NSSplitViewWillResizeSubviews: NSNotification.Name

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

Relationships

Inherits From

Conforms To