Setting the Line Height/ Line Spacing in an NSTextView

Joshua picture Joshua · Dec 24, 2009 · Viewed 10k times · Source

How would I set the Line Height or Line Spacing in an NSTextView (i.e. how tall each line is, or how much space is between each line)?

Answer

Jiulong Zhao picture Jiulong Zhao · Apr 22, 2012

leave the answer in case someone need:

NSMutableParagraphStyle * myStyle = [[NSMutableParagraphStyle alloc] init];
[myStyle setLineSpacing:10.0];
[myTextView setDefaultParagraphStyle:myStyle];