• 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
NSForegroundColorAttributeName without AppKit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSForegroundColorAttributeName without AppKit


  • Subject: NSForegroundColorAttributeName without AppKit
  • From: BareFeet <email@hidden>
  • Date: Fri, 19 Feb 2010 19:05:57 +1100

Hi all,

I have some working code for adding attributes to a string. I'd like to modify it so it will work without needing AppKit. I can get it all going except the NSForegroundColorAttributeName constant which seems to only exist in AppKit.

Here's an example:

NSColor* tokenColor = [NSColor red];
NSDictionary* tokenAttributesDict = [NSDictionary dictionaryWithObject:tokenColor forKey:NSForegroundColorAttributeName];
NSRange tokenRange = NSMakeRange(startCharN, [token length]);
[tokenizedAttributedString addAttributes:tokenAttributesDict range:tokenRange];

Is there an alternative to NSForegroundColorAttributeName I can use without needing AppKit?

Thanks,
Tom
BareFeet

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSForegroundColorAttributeName without AppKit
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: NSPredicate regex
  • Next by Date: Question about NSScrollView
  • Previous by thread: Re: How to detect if mouse on border of view
  • Next by thread: Re: NSForegroundColorAttributeName without AppKit
  • Index(es):
    • Date
    • Thread