Post

Replies

Boosts

Views

Activity

UITextView with large `textContainerInset` scrolls upwards when selecting text
Whenever a UITextView has a large textContainerInset it starts scrolling upwards rapidly when selecting text. For my use case, I have a custom view that I display in the text view to show the comment you are writing a reply to. To accomplish this, I use the textContainerInset and set the top portion of that inset to a large value. Here is a video showing the issue: https://streamable.com/9z57ok I've also made a very simple sample project to demonstrate and here is the main view controller code: https://gist.github.com/rickharrison/9cf563bcb22130bfafc7d3b5d37c55f2 Is it possible to disable scrolling of the UITextView while the selection UI is shown? Or is there another way I should inset the text to edit? I found another thread with this issue from years ago, but no solution - https://developer.apple.com/forums/thread/129882
3
0
352
Jun ’24