Setting estimatedRowHeight on UITableViewController's tableView results in odd auto layout in cells

Originator:me
Number:rdar://19576926 Date Originated:23-Jan-2015 10:47 AM
Status:Open Resolved:
Product:Developer Tools Product Version:iOS 8.1
Classification:Other Bug Reproducible:Always
 
Summary:
If I set estimatedRowHeight on a UITableViewController’s tableView, auto layout lays out the cell’s subviews incorrectly until the cells scroll off screen and are re-laid out.

Steps to Reproduce:
1. Create a UITableViewController in a storyboard.
2. Add some labels to a cell and add constraints.
3. Set the numberOfLines of those labels to 0.
4. Set the rowHeight of the table view controller’s tableView to UITableViewAutomaticDimension.
5. Set the estimatedRowHeight to an arbitrary value, say, 100.0;
6. Configure the rest of the table view delegate methods normally.
7. Run the simulator and note that the cells do not layout correctly until they are scrolled offscreen.

Expected Results:
Auto layout correctly lays out the cell’s subviews.

Actual Results:
The labels do not layout correctly.

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!