I have a UITextView with the textAlignment property set to .center
When there is existing text inside the textView and I select it to edit that text, if I select the text in the middle of the existing text, when I hit the return key the cursor goes to the left edge of the textView rather than the center. Typing the new text is done correctly and the cursor jumps back to the center and the text at all times appears correctly centered.
It's just the annoying cursor jumping to the left edge everytime I hit return which I can't seem to figure a fix for. If I start typing in the textView with no text at all or select the end of the text when I start to edit, everything is fine and the cursor correctly remains centered when I press enter.
The textView was created programmatically and added as a subview of a scrollView.