outlineView(_:numberOfChildrenOfItem:)
Returns the number of child items encompassed by a given item.
Declaration
@MainActor optional func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> IntParameters
- 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.
See Also
Instance Methods
outlineView(_:acceptDrop:item:childIndex:)outlineView(_:child:ofItem:)outlineView(_:draggingSession:endedAt:operation:)outlineView(_:draggingSession:willBeginAt:forItems:)outlineView(_:isItemExpandable:)outlineView(_:itemForPersistentObject:)outlineView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)outlineView(_:objectValueFor:byItem:)outlineView(_:pasteboardWriterForItem:)outlineView(_:persistentObjectForItem:)outlineView(_:setObjectValue:for:byItem:)outlineView(_:sortDescriptorsDidChange:)outlineView(_:updateDraggingItemsForDrag:)outlineView(_:validateDrop:proposedItem:proposedChildIndex:)outlineView(_:writeItems:to:)