I am trying to layout text on a UIView.
(The yellow area is the frame of the UILabel with a background color).
When I use sizeWithFont I get this, which has a very large space above the letter:

When I use font.pointSize i get this for "i" which is good-

BUT When i use it for "p" I get the precise height but the letter is drawn in the bottom and cropped.

**How can i get get the glyph only centered in the frame ? **
Thanks
Shani
There are a lot of properties on UIFont to help in this situation:
pointSizeascenderdescendercapHeightxHeightlineHeightIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With