Ric Levy
Ric Levy

Reputation: 996

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 difference 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).

Upvotes: 2

Views: 2441

Answers (1)

Alex Terente
Alex Terente

Reputation: 12036

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

Upvotes: 4

Related Questions