Wrong scroll position when entering text into a UITextView that is a subview of a UIScrollView

Originator:plu
Number:rdar://25648966 Date Originated:11-Apr-2016 07:45 AM
Status:Open Resolved:
Product:iOS SDK Product Version:9.3
Classification: Reproducible:Always
 
Summary:
There's an example project attached that will reproduce the issue on the iPhone 5 (but also on any other device, depending on the amount of text you enter). You just need to enter some text (multiple lines, but not using the return key!). Once the entered text hits the end of the line, a new line is inserted. UITextView will automatically scroll to that position. Unfortunately it does not scroll to the correct position, so you cannot see anymore what text you're actually typing.

Steps to Reproduce:
1. Launch attached example project on an iPhone 5 device or Simulator
2. Enter some text (multiple lines, but not using the return key!)
3. OK: It adds a new line if necessary
4. OK: It tries to scroll so you can see what you're typing
5. NOK: It does not scroll to the correct position, you cannot see the text anymore you're typing

Expected Results:
It should scroll to the correct position so you can see what you're typing.

Actual Results:
It does not scroll to the correct position so you cannot see what you're typing.

Version:
iOS 9.3

Notes:


Configuration:
iPhone 5 Simulator

Sample project:
https://github.com/plu/radar-25648966

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!