• 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: NSAttributedString advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAttributedString advice


  • Subject: Re: NSAttributedString advice
  • From: Jonathan Jackel <email@hidden>
  • Date: Sun, 12 Dec 2004 01:34:23 -0500


On Dec 10, 2004, at 5:10 PM, Moray Taylor wrote:

Hi,

In my program I require an NSAttributedString that can not only contain styles such as bold, italic etc.. , but contain 'named styles' much like Quark Xpress or MS Word would have.

I assume I can use the addAttribute:withRange to set where my 'named styles' are,

Absolutely -- except you probably want to use an NSTextStorage, which is a subclass of NSMutableAttributedString.


but how would I make the NSAttributedString lookup what these styles meant, and render itself accordingly? Is this possible, or do I need to make my own attributedstring class?

Hopefully John Randolph will chime in on this one, but I suspect you would need to subclass NSLayoutManager. I don't even want to guess how.


Jonathan

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


  • Follow-Ups:
    • Re: NSAttributedString advice
      • From: Douglas Davidson <email@hidden>
References: 
 >NSAttributedString advice (From: Moray Taylor <email@hidden>)

  • Prev by Date: Re: isEditable
  • Next by Date: How to create a horizontal line for a separatorItem
  • Previous by thread: NSAttributedString advice
  • Next by thread: Re: NSAttributedString advice
  • Index(es):
    • Date
    • Thread