So I have a UITextView that the user can edit, but there may also be some text inserted programmatically into the textView as well, and it could be inserted at any arbitrary range in the textView. Currently, this also moves the caret position from where the user was currently working, which is undesirable. So anytime I do this:
self.textView.text = //some text inserted
It moves the caret position. So what would be the best way to prevent the caret position from moving, or make it totally ignorant and independent of programmatic changes and only move in response to user changes?