scrollToRowAtIndexPath:atScrollPosition:animated: is broken when using estimatedRowHeight

Originator:padraig.kennedy
Number:rdar://20829131 Date Originated:05-May-2015 05:15 PM
Status:Open Resolved:
Product:iOS SDK Product Version:8.3
Classification:UI/Usability Reproducible:Always
 
Summary:
If a tableView uses estimatedRowHeight, scrollToRowAtIndexPath:atScrollPosition:animated will not scroll to the correct location in the tableview.

Steps to Reproduce:
1. Create a table with lots of cells. 
2. Provide an `estimatedRowHeight`
3. Implement `tableView:heightForRowAtIndexPath:` and return a different value than `estimatedRowHeight`
4. Call `scrollToRowAtIndexPath:atScrollPosition:animated` to go to the last cell

Expected Results:
You should now be at the bottom of the table.

Actual Results:

If the total for all estimated heights is > actual heights, we zoom past the end and get a blank screen. If the total for all estimated heights is < actual heights, we don't reach the end — the scroller is not 100% of the way.
    
The results differ between `animated` being YES or NO, but neither behaviour correct puts the cell onscreen.

Comments

Duplicated radar was closed, so I resubmitted

By padraig.kennedy at July 8, 2015, 11:37 p.m. (reply...)

Engineering has determined that your bug report (20829131) is a duplicate of another issue (15283329) and will be closed.

By padraig.kennedy at May 20, 2015, 11:40 p.m. (reply...)

Test project here: https://github.com/PadraigK/estimatedRowHeightFail/tree/master

By padraig.kennedy at May 6, 2015, 12:42 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!