Instance Property


The split view managed by the split view controller.


var splitView: NSSplitView { get set }


This property gives you access to the split view controller’s split view, for querying its attributes or customizing it in certain ways.

By default, a split view is configured with horizontal dividers so that child views are arranged vertically, from top to bottom in the split view controller’s view. To specify horizontal (side-by-side) arrangement of child views, implement the vertical property of the NSSplitView object to return true.

Also by default, a split view has a divider style of NSSplitView.DividerStyle.thin, and does not have an auto-save name.

To provide a custom split view, set this property at any time before you call super in the inherited viewDidLoad() method; that is, before the split view controller’s isViewLoaded property is true.

The split view is not guaranteed to be the same object as that in the split view controller’s inherited view property. To access the split view, always use the splitView property.

See Also

Configuring and Managing a Split View Controller

func splitViewItem(for: NSViewController) -> NSSplitViewItem?

Returns the corresponding split view item for a given child view controller of the split view controller.

var splitViewItems: [NSSplitViewItem]

The array of split view items that correspond to the split view controller’s child view controllers.