I have a UITextView that can be left aligned, right aligned or centered. I noticed that if I align the textView correctly, any trailing spaces in any line of text in the textView are ignored. This does not occur for leading spaces when aligned to the left.
Visually, this is what happens (with "-" to visualize space):
Left Alignment:
-some-text-
The same text is right-aligned:
--some-text
Adding additional text returns the back space in the correct position:
-some-text-b
I can’t understand why this is so, or how I can get the right alignment to represent trailing spaces on the right side. Any suggestions?