ios 16 uitextview refresh problem

Adding text through uitextview text property have strange effect in ios 16. Have: uitextview with some text that bigger than uitextview height The end of text is visible (so the start of the text is not visible)

Testing: Add some string ("a") to the end of the uitextview (txtView.text = txtView.text + "a")

Expected: The txtView shows the the old text + "a"

Observed: After one or two adding the "a" the old text disappeared from the text view After tapping in the textview the text appear

I have attached the small project with uitextview and two buttons: button left and button right. Button right - adding the letter "a" to the end of the text Button left - simply removes the soft keyboard if its appear

This project works correct in ios 15 (emulator and real device)

and works wrong in ios 16 (emulator and real device)

Add this project to github: https://github.com/prjsoft/ios16textview

The behaviour of uitextview has been changed from each beta, but not working correct. And in the recent beta (5) after adding some letter "a" to the end of text view the scroll area becomes longer that the end of text view.

In the lates beta 7 of ios 16 - the wrong behaviour still exists. Now if you go to the end of the file, then open keyboard and then pressing the right button - the text starts flickering on the screen

ios 16 uitextview refresh problem
 
 
Q