outlineView(_:heightOfRowByItem:)
Returns the height in points of the row containing item.
Declaration
@MainActor optional func outlineView(_ outlineView: NSOutlineView, heightOfRowByItem item: Any) -> CGFloatParameters
- outlineView:
The outline view that sent the message.
- item:
The row item.
Return Value
The height of the row.
Discussion
Values returned by this method should not include intercell spacing and must be greater than 0.
Implement this method to support an outline view with varying row heights.
For large tables in particular, you should make sure that this method is efficient. NSOutlineView may cache the values this method returns, so if you would like to change a row’s height make sure to invalidate the row height by calling noteHeightOfRows(withIndexesChanged:). NSOutlineView automatically invalidates its entire row height cache in reloadData() and noteNumberOfRowsChanged().
If you call view(atColumn:row:makeIfNecessary:) or rowView(atRow:makeIfNecessary:) within your implementation of this method, an exception is thrown.