UITableView jumping to top on endUpdates while typing inside a cell on iOS 8 auto height
Originator: | joshua.dance | ||
Number: | rdar://20105573 | Date Originated: | 3/10/2015 |
Status: | open | Resolved: | |
Product: | iOS SDK | Product Version: | iOS 8.2 |
Classification: | UI/UX | Reproducible: | always |
Summary: I am using iOS 8 self-sizing cells (tableView.rowHeight = UITableViewAutomaticDimension and tableView:estimatedHeightForRowAtIndexPath:) combination. It works great until I start typing something inside a cell. When I'm typing, I'm calling beginUpdates/endUpdates pair to resize my cell (text view grows as I type and shrinks as I delete) but each call results in a bad jump to top of the table view. If I remove the beginUpdates/endUpdates pair then it doesn't jump but my cell doesn't resize as I type. We figured out we could check and only update the table when the size actually needs to change via: // Resize cell only when cell's size is changes if size.height != newSize.height { so it only jumps when the cell gets bigger but it still jumps. I attached the project, also available here on Github - https://github.com/joshdance/TableViewJumpIssue Steps to Reproduce: 1. Tap in the cell 2. Start entering text Expected Results: I would expect the tableView not to jump to the top when it gets resized. Or maybe a parameter to set where I could set a scroll location it would stay at while the table is updating. Actual Results: Calling the beginUpdates/endUpdates pair to resize my cell but each call results in a bad jump to top of the tableView. Version: iOS 8.2 Notes: Configuration: iOS Simulator. Also iPhone 6 Attachments: 'TableViewJumpIssue.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!
Facing the same issue.
I am also facing the same issue on iOS8 only on iOS7 it works fine. Any Fixes or update on this.