• 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: OK, but what do 'attributes' look like?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OK, but what do 'attributes' look like?


  • Subject: Re: OK, but what do 'attributes' look like?
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 9 Mar 2004 00:43:06 -0500

On Mar 9, 2004, at 12:37 AM, Denis Stanton wrote:

Hi Dave

On Tuesday, March 9, 2004, at 05:32 PM, Dave Keck wrote:

Look at the constants for NSAttributedString Additions.

Thanks for helping, and for the rapid response.

I'm sure you're on the right track, but without an example I haven't quite got it yet.

I tried looking at NSAttributedString already and came up with:

[myString drawInRect: myRect with attributes: [NSDictionary dictionaryWithObject @"Helvetica 9-point" forKey: NSFontAttributeName]];

I got the "Helvetica 9-point" part from the example constants defined for NSAttributedString Additions.. It looks surprisingly like natural language when I would have expected separate dictionary items for font name and size.



You're not quite there yet..

Look at the constants table in the NSAttributed Strings additions here


http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSAttributedString.html#// apple_ref/doc/uid/20000167


specifically, the middle column tells you the object type
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: OK, but what do 'attributes' look like?
      • From: Denis Stanton <email@hidden>
References: 
 >Re: OK, but what do 'attributes' look like? (From: Denis Stanton <email@hidden>)

  • Prev by Date: Re: OK, but what do 'attributes' look like?
  • Next by Date: Re: OK, but what do 'attributes' look like?
  • Previous by thread: Re: OK, but what do 'attributes' look like?
  • Next by thread: Re: OK, but what do 'attributes' look like?
  • Index(es):
    • Date
    • Thread