UITableView scrollToRowAtIndexPath:atScrollPosition:animated: is unreliable
| Originator: | cedric.luthi | ||
| Number: | rdar://9896583 | Date Originated: | 04-Aug-2011 05:44 PM |
| Status: | Open | Resolved: | |
| Product: | iPhone SDK | Product Version: | 5.0b4 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: The -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] method is unreliable when called twice in a row. Steps to Reproduce: 1. Call -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] twice with different index paths parameters, for example: [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:32 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES]; [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:64 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES]; Expected Results: The table view should scroll to the row #64 Actual Results: The table view scrolls to the row #32 Regression: This problem exists on iOS 3, 4 and 5. Notes: The project at https://github.com/0xced/radars/tree/master/ScrollToRow demonstrates this problem. Enabling "Stop Animations" works around the problem but uses undocumented APIs.
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!