Outline Views

Outline views display hierarchical information as an outline. Each branch node has a disclosure triangle to indicate that it has children. Clicking the triangle toggles it between pointing right or down. If the triangle points right, none of its children are displayed. If the triangle points down, all the children are displayed.

In Cocoa, the NSOutlineView class implements outline views. NSOutlineView is actually a subclass of NSTableView. This chapter’s discussion of table views is a prerequisite to understanding outline views. If that material is unfamiliar, it should be reviewed before proceeding.

Because an outline view displays a model that is hierarchical and not tabular, the NSOutlineView class has all new data source and ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.