Can I set the UIFont height?
Can I set the UIFont height as well as the line spacing? I googled this, it seems no way to set height for the IOS built-in font. One possible way is to use c开发者_运维知识库ustomized font. This seems too heavy since I just want to set line spacing and height. Thanks in advance!
Once you get an UIFont
instance from iOS for the given size, you can't alter size later.
because it define all of it's property as readonly
.
you could access the height of character for Caps and Lower using the properties.
@property(nonatomic, readonly) CGFloat xHeight
@property(nonatomic,readonly) CGFloat lineHeight
@property(nonatomic, readonly) CGFloat capHeight
精彩评论