Instance Method

outlineView(_:numberOfChildrenOfItem:)

Returns the number of child items encompassed by a given item.

Declaration

optional func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int

Parameters

outlineView

The outline view that sent the message.

item

An item in the data source.

Return Value

The number of child items encompassed by item. If item is nil, this method should return the number of children for the top-level item.

Discussion

The outlineView(_:numberOfChildrenOfItem:) method is called very frequently, so it must be efficient.