UITableView bouncing back to the top of a section when calling reloadRowsAtIndexPaths

后端 未结 9 1905
既然无缘
既然无缘 2020-12-15 03:14

When a user taps a button in one of my rows I am updating the underlying model for that row and then calling reloadRowsAtIndexPaths for the given row (i.e. single row reload

9条回答
  •  抹茶落季
    2020-12-15 03:52

    If you know the minimum height of your cell, you must specify that while setting estimatedRowHeight. I was setting it to 1 as I have read before somewhere that any value above 0 would suffice the purpose, but it was the culprit.

    When I set it to 44, which was the minimum height my cell could have, all went fine.

    Dynamic heights were also working fine, no issues with this fix.

提交回复
热议问题