When entering text into a UITextView, if you type enough lines or hit return enough times, the cursor will naturally go under the keyboard. Certain apps, such as the Apple Notes app, handle this just fine, scrolling the textview until the cursor is visible again. I have struggled to replicate this behavior. I've had no luck with textView.scrollRangeToVisible()
with the selectedRange or textView.scrollRectToVisible()
with the caret rect.
Some other things I've tried: