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

Re: Height of an NSAttributedString


  • Subject: Re: Height of an NSAttributedString
  • From: Philip Dow <email@hidden>
  • Date: Wed, 21 Dec 2005 19:06:02 +0100

Hi Douglas,

So give this guy a try: http://homepage.mac.com/philipdow/ PDScrollingText.zip

I've included an rtfd file for testing. It's the about text for my app. Run the test using that file as is. It should work okay. Now open up that file and change the font, for kicks to Times rather than Times New Roman. On my end, the height calculation is no longer correct. Even worse is Lucida Grande or just about anything else. Okay, switch back to Times New Roman. Change the line height. Run test...

Note that I'm not yet pleased with the fade gradient. Still working on it. I'm no graphics guy, ya know? =)

-Phil

On Dec 21, 2005, at 6:34 PM, Douglas Davidson wrote:

You should now be able to use -[NSString boundingRectWithSize:options:attributes:] or -[NSAttributedString boundingRectWithSize:options:]. Alternatively, you can certainly use a text view to do the measuring for you, or for the most control, set up a text storage, text container, and layout manager yourself.

I'm not sure exactly what you mean when you say that you are not getting accurate results; perhaps you could produce and post a simple example, showing the results you expect and the results you actually see.

Douglas Davidson



_______________________________________________
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
References: 
 >Height of an NSAttributedString (From: Philip Dow <email@hidden>)
 >Re: Height of an NSAttributedString (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: CoreData - Fast Deletion Of Thousands Of ManagedObjects?
  • Next by Date: Re: Authenticating multiple Installers with one prompt
  • Previous by thread: Re: Height of an NSAttributedString
  • Next by thread: How do I send an NSString to a text file?
  • Index(es):
    • Date
    • Thread