iOS 8 Auto cell height - Can't scroll to last row

前端 未结 12 1201
慢半拍i
慢半拍i 2020-11-28 20:50

I am using iOS 8 new self-sizing cells. Visually it works good - each cell gets its right size. However, if I try to scroll to the last row, the table view

12条回答
  •  一生所求
    2020-11-28 21:27

    For my case, I found a temporary workaround by not suggesting an estimated cell height to the program. I did this by commenting out the following method in my code:

    - (CGFloat) tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
    

    However, please take note that doing so may affect the user experience when the user scrolls, if your cells varies a lot compared to each other. For my case, no noticeable difference so far.

    Hope it helps!

提交回复
热议问题