returning 0 for estimatedHeightForRowAtIndexPath does not work as expected

Originator:mbw234
Number:rdar://14728979 Date Originated:8/13/2013
Status:Open Resolved:
Product:iPhone SDK Product Version:7.0
Classification:Serious Bug Reproducible:Always
 
13-Aug-2013 06:16 PM Brandon Williams:
Summary:

If one implements the "estimatedHeightForRowAtIndexPath" method of UITableViewDelegate and simply returns 0, the docs lead one to believe that the table view will just fallback to using "heightForRowAtIndexPath" in order to layout the view. Returning -1 seems to operate more like one would expect, but then leads to other strange layout problems, especially when animating changes.

Steps to Reproduce:

Implement the UITableViewDelegate to return 0 for "estimatedHeightForRowAtIndexPath".

Expected Results:

The UITableView should use "heightForRowAtIndexPath" to layout the cells.

Actual Results:

All of the cells in the table view are given height 0.

Regression:

I've only tested this on DP5.

Notes:

I've attached a sample project to show the expected and actual behavior.

13-Aug-2013 06:16 PM Brandon Williams:
'Estimate.zip' was successfully uploaded
http://d.pr/f/8mjR

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!