TableView jumps when using self sizing cells (Autolayout)
| Originator: | klaa.name | ||
| Number: | rdar://21076714 | Date Originated: | 22.05.2015 |
| Status: | Closed | Resolved: | |
| Product: | iOS | Product Version: | |
| Classification: | Reproducible: | Always |
Summary: When using autolayou to let the system be responsible for height of UITableViewCells the UITableView jumps when scrolling. Especially visible when the cells differ largely in size. In other words: When the content of a cell (lets say a UILabel) varies in height (due to different amount of text), the cell itself aligns to its height automatically. Now, if you scroll through the TableView you will notice jumps. The bigger the differences in size, the more visible is the jumps (especially when scrolling slow – a fast scroll won't let you observe the jumps). Also notice the ScrollViewIndicator on the right hand side when scrolling. It will jump, too. The only way to minimize the jumps it to provide an exact value in estimatedHeightForRowAtIndexPath. However, the meaning of using autolayout is to let the system calculate the height of a cell. If it is necessary to provide a (nearly) exact estimation, this point will be missed. Steps to Reproduce: 1. Open the app contained in the sample project I attached. 2. Scroll slowly through the TableView and notice the jumps. 3. If you scroll fast you will notice a jumping ScrollViewIndicator, too. Expected Results: I would expect the TableView to scroll smoothly no mater what size autolayout calculated for the containing cells. Actual Results: A jumping TableView and also jumping ScrollViewIndicator. Version: > iOS 8.0 Notes: Please also read the comments about the estimatedHeightForRowAtIndexPath method contained in 'TableViewController.swift' (attached sample project) Configuration: Basically every iOS Simulator as well as the iPhone Attachments: 'TableViewCellWithAutoLayoutiOS8.zip' was successfully uploaded.
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!
Closed
Closed as the issue was fixed in iOS 9.