Prashant
Prashant

Reputation: 2192

line spacing NSTextView

If you install Microsoft word on Mac and open a document, you can increase line spacing to 2 by hitting Command + 2. Now my cocoa app uses NSTextView. And my users want a similar functionality in the app. I looked at the NSTextView apis and could not find any which will help me here. Is this something that can be accomplished using the defaults write command may be ?.

Upvotes: 0

Views: 410

Answers (1)

Mike Abdullah
Mike Abdullah

Reputation: 15003

Text Views are views to display their model, NSTextStorage. NSTextStorage is a subclass of NSAttributedString. You need to modify the attributes of the text for custom line spacing.

Upvotes: 2

Related Questions