Incremental Updates

Update individual rows or cells without reloading the entire table.

When to Use

While setData(_:animatingDifferences:) handles most update scenarios, sometimes you need finer control for:

  • Single row updates during editing
  • Cell content changes from user interaction
  • Performance-critical partial updates

Single Row Refresh

// User edited row 5
dataTable.reloadRow(at: 5)

Row Height Remeasurement

When cell content changes (e.g., text editing), update the row height:

// Text in row 3 changed, height may need adjustment
let heightChanged = dataTable.remeasureRow(3)

if heightChanged {
    // Layout was updated
}

This is useful for live text editing, expanding/collapsing content, and dynamic content updates.

When to Use Each Approach

ScenarioRecommended Approach
Full data refreshsetData(_:animatingDifferences:)
Multiple row changessetData(_:animatingDifferences:)
Single row visual refreshreloadRow(at:)
Cell height changedremeasureRow(_:)
Real-time typingremeasureRow(_:)