The issue arises because I calculate the position of mentions by predicting the number of characters added. When recalculating the mention positions, I rely on the shouldChangeTextIn range and replacementText to estimate the changes. However, the replacementText only gives me the character “ㄨ”, which leads me to believe that only one character is being added. In reality, it also includes an invisible U+2004, causing the calculation to fail due to an incorrect prediction.
Post
Replies
Boosts
Views
Activity
thanks, my scrollView contains several other views, and their total height exceeds the screen height. Any advice on handling unexpected scrolling in this case?
The example is quite simple. Actually, there are other views within the ScrollView, and the total height exceeds the screen height, thanks