4

I've got a table that has some rows that hold a textfield each. When the textfield updates some rows of the table have to update to display some new data. This works fine as long as the table is not scrolled down at all.

However, if the table is scrolled, reloading the rows results in a "jump" animation for the table. My code:

formFieldsTable.reloadRows(at: [indexPath,indexPath2], with: .none)
Dixit Akabari
  • 2,419
  • 13
  • 26
Return-1
  • 2,329
  • 3
  • 21
  • 56

1 Answers1

3

Per one of the comments above, this fixed the same issue for me:

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
    return 75.0
}

override func viewDidLoad() {
    super.viewDidLoad()
    formFieldsTable.estimatedRowHeight = 75
    ...
}
Joel Prine
  • 63
  • 5