Animate self-sizing NSTableView row height


March 2019


9 time


I have a project that uses self-sizing table view cells. I'd like to animate when the height of a cell changes. NSTableView's noteHeightOfRows(withIndexesChanged:) will do this for view-based cells, but only when providing the height explicitly in the delegate's tableView(_, heightOfRow:) method. When cell height is calculated with auto layout, this value is ignored.

I can get the cell view itself to animate, but its containing row view jumps to the final size dictated by the constraints. Also tried using a height constraint on the row view and animating that, but it also was ignored. Anyone left developing Mac apps that has solved this problem?


0 answers