NSOutlineView is a subclass of
NSTableView that uses a row-and-column format to display hierarchical data that can be expanded and collapsed, such as directories and files in a file system. A user can expand and collapse rows, edit values, and resize and rearrange columns.
- macOS 10.10+
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.
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
The view gets data from a data source (see
The view retrieves only the data that needs to be displayed.