I have a problem with UITextField when I wish to render characters like Å and such within its rect.
The top of it is being clipped out, Making the Å look like an A.
In some cases i have solved it with a custom UITextField like this :
- (void)drawTextInRect:(CGRect)rect {
rect.origin.y = rect.origin.y+5;
[super drawTextInRect:rect];
}
Which works when the text is just being displayed normally like this :

But when you start editing the text, its like the drawTextInRect is no longer applied, and the top of the characters disappear again.
Like so:

Does anyone else have ideas to how to fix this ?
Override
- (CGRect)textRectForBounds:(CGRect)boundsinstead to adjust the text rect in all circumstances. I suspect thatUITextFielduses a label when you don’t edit the text and something else when you do and that only one of them callsdrawTextInRect:in particular.