• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView default plain text font
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView default plain text font


  • Subject: Re: NSTextView default plain text font
  • From: Keary Suska <email@hidden>
  • Date: Sat, 26 Jul 2014 08:56:45 -0600

On Jul 25, 2014, at 8:05 PM, Carl Hoefs <email@hidden> wrote:

> I have an OS X app that uses an NSTextView to hold text that is pasted into it (among other things). I've deselected "Allows Rich Text" in Xcode because I want the text displayed uniformly in a non proportional font and all of the same size (such as Monaco 12 pt). However, the text that is pasted into the NSTextView is always displayed in Helvetica 12 pt font. I don't see what method I would use to set this, either programmatically or directly within Xcode.

It is somewhat counter-intuitive, but setting the font on an NSTextView does not set the "default" font. You need to call -setTypingAttributes: on the text view to set the "default" font.

HTH,

Keary Suska
Esoteritech, Inc.



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >NSTextView default plain text font (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: How do you get Xcode to symbolicate an OS X crash report?
  • Next by Date: Re: How do you get Xcode to symbolicate an OS X crash report?
  • Previous by thread: Re: NSTextView default plain text font
  • Next by thread: Should the Simulator talk?
  • Index(es):
    • Date
    • Thread