Reputation: 87
Everytime I use -setFont: or -setFont:Range: on my NSTextView, it does change the font, but it shouldn't. I just want to change the font the user is typing with.
For example, if the user types 'hi' it uses the default Helvetica font. When I change the font to Times New Roman it changes that 'hi' into Times New Roman. I don't want that. I just want that, from now on, when the user types, Times New Roman is used instead of Helvetica.
Upvotes: 1
Views: 792
Reputation: 185661
I think you might want to use -[NSTextView setTypingAttributes:]
instead. You should also make sure your text view is set as rich text.
Upvotes: 3