UITableView displays based on estimatedRowHeight briefly when using self sizing cells

Originator:sanket.firodiya
Number:rdar://44619928 Date Originated:09-19-2018
Status:Open Resolved:
Product:UIKit Product Version:iOS 11
Classification: Reproducible:Always
 
Summary:
I have a UITableView that uses auto-layout and self-sizing cells. The layout is correct most of the times. However, in a certain sequence of actions of reloading the tableView and inserting a row in it, the tableView displays the cells with the estimatedRowHeight and animates to the correct height (based on self sizing) afterward. 

Steps to Reproduce:
- call reloadData() on a tableView
- override willDisplay and insert a row in the tableView
- call reloadData() again in a DispatchQueue

Expected Results:
- tableView has a new row inserted in it and all cells have correct heights

Actual Results:
- tableView has a new row inserted but cells have estimatedRowHeight just after inserting the row for a brief amount of time

Configuration: Xcode Version 9.4.1 (9F2000)
iOS: 11.4.1 (15G77)

Sample project: https://github.com/sanketfirodiya/UITableViewTest

Comments


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!