Instance Method


Asks the delegate for the height of the specified row.


- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row;



The table view that sent the message.


The row index.

Return Value

The height of the row. The height should not include intercell spacing and must be greater than zero.


You should implement this method if your table supports varying row heights.

Although table views may cache the returned values, you should ensure that this method is efficient. When you change a row's height you must invalidate the existing row height by calling noteHeightOfRowsWithIndexesChanged:. NSTableView automatically invalidates its entire row height cache when reloadData and noteNumberOfRowsChanged are called.

If you call viewAtColumn:row:makeIfNecessary: or rowViewAtRow:makeIfNecessary: within your implementation of this method, an exception is thrown.

See Also

Setting Row and Column Size

- tableView:sizeToFitWidthOfColumn:

Asks the delegate to provide custom sizing behavior when a column’s resize divider is double clicked.