TableView auto-scrolls back and forth if cell includes a scrollable TextView
| Originator: | futuretap | ||
| Number: | rdar://11668320 | Date Originated: | 14-Jun-2012 11:32 AM |
| Status: | Closed/Resolved | Resolved: | 19-Jul-2012 06:51 PM |
| Product: | iPhone SDK | Product Version: | 6.0 beta 1 |
| Classification: | UI/Usability | Reproducible: | Always |
My UITableViewCell consists of (amongst some UILabels) a UITextView with scrollingEnabled = NO. When I start scrolling the tableView it automatically scrolls back and forth for around the height of one row in an endless loop. The code just worked in prior iOS releases.
When I set a breakpoint in -[UIScrollView setContentOffset:animated:] I get this backtrace:
* thread #1: tid = 0x1f03, 0x009fdfb7 UIKit`-[UIScrollView setContentOffset:animated:], stop reason = breakpoint 57.2
frame #0: 0x009fdfb7 UIKit`-[UIScrollView setContentOffset:animated:]
frame #1: 0x009fe5df UIKit`-[UIScrollView scrollRectToVisible:animated:] + 1500
frame #2: 0x00ad7f4d UIKit`-[UITextView scrollRectToVisibleInContainingScrollView] + 359
frame #3: 0x00ad8313 UIKit`-[UITextView webViewDidChange:] + 813
frame #4: 0x0decf001 UIKit`-[UITextViewAccessibility(SafeCategory) webViewDidChange:] + 85
frame #5: 0x00ada22d UIKit`-[UITextView setText:] + 743
frame #6: 0x00231986 WhereTo`-[MenuEntryViewCell setEntry:] + 406 at MenuEntryViewCell.m:69
frame #7: 0x00228f89 WhereTo`-[MenuViewController tableView:cellForRowAtIndexPath:] + 361 at MenuViewController.m:158
It looks like setting the text of the textView causes the outer tableView to scroll. If I set scrollingEnabled to YES, everything is fine. This is an acceptable workaround for me because I've set textView.userInteractionEnabled to NO so the textView doesn't scroll anyway. So don't expect me to write a sample app ;-)
I reproduced this with the help of [redacted] in the WWDC lab (if you wanna ask him for details).
19-Jul-2012 06:51 PM Ortwin Gentz:
I can't reproduce this in beta 3 anymore.
This issue has been verified as resolved and can be closed.
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!