Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextView top of text on first line clipped cut

I have a UITextView with a strange issue. When I type in emojis, the top of the emojis are clipped on the first line. It's not a problem with the scroll and I have tried putting the content inset so the text is deep inside the text view frame, but the problem persists. Any ideas why this is happening?

THERE IS NO CODE FOR THIS. IT IS SIMPLY A UITEXTVIEW IN INTERFACE BUILDER. NO CONNECTING IBOUTLETS OR ANYTHING. ATTACHED IS THE INSPECTOR IMAGE

enter image description here

like image 809
Zigglzworth Avatar asked Nov 20 '22 13:11

Zigglzworth


1 Answers

I had this problem when using a custom font. I was able to solve it by setting the LineHeightMultiple in the ParagraphStyle to 1.2, but you'll probably need to play around with different values depending on your font.

like image 129
Graham Pett Avatar answered Jan 01 '23 07:01

Graham Pett