This is a tricky aspect of NSTextField in table views. usesAutomaticRowHeights relies on the text field's intrinsicContentSize to determine row height. When isEditable is true, NSTextField internally changes its sizing behavior and stops reporting a multi-line intrinsic height, so the row collapses to a single line. Your observation that the text still wraps internally but the cell height doesn't update is exactly right. The fix is to stop using usesAutomaticRowHeights for editable text fields and calculate row heights manually using tableView(_:heightOfRow:). Use a separate non-editable text field as a measurement prototype — since non-editable text fields calculate wrapping height correctly — and call noteHeightOfRows(withIndexesChanged:) when the text changes so the row resizes as someone types. Here is a working example: // Prototype field for height measurement (non-editable, so wrapping height is correct) let measureField: NSTextField = { let tf = NSTextField(wrappingLabelWithString: ) tf.isEditable = f
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: