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
| Scenario | Recommended Approach |
|---|---|
| Full data refresh | setData(_:animatingDifferences:) |
| Multiple row changes | setData(_:animatingDifferences:) |
| Single row visual refresh | reloadRow(at:) |
| Cell height changed | remeasureRow(_:) |
| Real-time typing | remeasureRow(_:) |