Reputation: 6122
I'm trying to get a row in my table view to resize its height, but the delegate method:
- (CGFloat) tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row
is never called. I have implemented other delegate methods and they work perfectly. Is there something I am not doing?
Thank you!
Upvotes: 1
Views: 582
Reputation: 57139
Are you changing the row heights? From the docs:
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 whenreloadData
andnoteNumberOfRowsChanged
are called.
Upvotes: 2
Reputation: 299345
Can you confirm that you've implemented other delegate methods and not other datasource methods? A common error is to hook up your datasource but not your delegate. They're different outlets on an NSTableView.
Upvotes: 2