UITableView scrolls to top when reloading cells with changing cell heights

后端 未结 4 913
面向向阳花
面向向阳花 2020-12-09 05:57

I have a table view which contains a placeholders while it loads in images. When the image is loaded, I call reloadRowsAtIndexPaths:withRowAnimation:. At this p

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 06:42

    I was seeing this, and the fix that worked for me was to choose an estimated row height that is the smallest of the possible rows. It had originally been set to the largest possible row height when the unintended scrolling was happening. I am just using the single tableView.estimatedRowHeight property, not the delegate method.

提交回复
热议问题