I've got a UITextView with a small text in it. It displays correctly with black text on white background. However, when I want to change the text colour to a colour other than black, the text position changes (as if there was an empty line added at the beginning of the text).
With no colour change or with textView.textColor = [UIColor blackColor];
:
When I change to another colour, here textView.textColor = [UIColor blueColor];
:
The code line I've given really is the only code element that changes, and even if the colours in the background and the text are different, this is because they are generated randomly, in a complete other part of my code. The content of the text NEVER had any influence on the display before, and when I change the text colour it ALWAYS looks like in the 2nd picture.
I am stunned by this behaviour, as textColor
shouldn't be modifying anything else than the font colour, should it ? Plus the fact that when I change to blackColor
, no weird behaviour.
Thank you for your help...