开发者

What is the difference between lineHeight and leading?

I understand that, in ye olden days of typesetting, 'leading' was the total height of the lead blocks used for the letters - i.e. the height of the lines.

So, in my UITextView, what is the differe开发者_如何学运维nce between textView.font.leading and textView.font.lineHeight? Both return the same values in NSLogs in the fonts I've tried.

(Extra info - I need this because I'm programatically creating a 'lined notepaper' effect, and I need the line height to change depending on the font size).


Deprecated in iOS 4.0 leading The receiver’s leading information. (read-only) (Deprecated in iOS 4.0. Use the lineHeight property instead.)

@property(nonatomic, readonly) CGFloat leading Discussion The leading value represents the spacing between lines of text and is measured (in points) from baseline to baseline.

Availability Available in iOS 2.0 and later. Deprecated in iOS 4.0. Declared In UIFont.h

Deprecated UIFont Methods

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜