NSOutlineView
A view that uses a row-and-column format to display hierarchical data like directories and files that can be expanded and collapsed.
Declaration
class NSOutlineViewOverview
Like a table view, an outline view does not store its own data, instead it retrieves data values as needed from a data source to which it has a weak reference (see Delegates and Data Sources). See NSOutlineViewDataSource, which declares the methods that an NSOutlineView object uses to access the contents of its data source object.
An outline view has the following features:
A user can expand and collapse rows, edit values, and resize and rearrange columns.
Each item in the outline view must be unique. In order for the collapsed state to remain consistent between reloads the item’s pointer must remain the same and the item must maintain isEqual(_:) sameness.
The view gets data from a data source (see NSOutlineViewDataSource).
The view retrieves only the data that needs to be displayed.
For more information about using NSOutlineView in your app, see Navigating Hierarchical Data Using Outline and Split Views.
Subclassing
Subclassing NSOutlineView is not recommended. Customization can be accomplished in your data source class implementation (conforming to NSOutlineViewDataSource) or your delegate class implementation (conforming to NSOutlineViewDelegate).
Topics
Accessing the Data Source
Working with Expandability
Expanding and Collapsing the Outline
Redisplaying Information
Converting Between Items and Rows
Working with the Outline Column
Working with Indentation
Working with Persistence
Supporting Drag and Drop
Getting Related Items
Getting the Frame for a Cell
Accessing the Delegate
Manipulating Items
insertItems(at:inParent:withAnimation:)moveItem(at:inParent:to:inParent:)removeItems(at:inParent:withAnimation:)