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
UIFontto help in this situation:pointSizeascenderdescendercapHeightxHeightlineHeight