UITableView scrollToRowAtIndexPath scrolls to wrong offset with estimatedRowHeight on iOS 7

后端 未结 9 1857
轮回少年
轮回少年 2021-02-12 12:46

I am using the estimatedRowHeight method from UITableView in iOS 7, which works perfectly for fast loading of a UITableView with 5000 rows of variable heights.

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-12 13:09

    try to add this code in -cellForRowAtIndexPath: right before return the cell

    [cell layoutIfNeeded]
    

提交回复
热议问题