• 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: Low-level text, why so hard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Low-level text, why so hard?


  • Subject: Re: Low-level text, why so hard?
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 23 Dec 2012 22:38:36 -0800

On Dec 23, 2012, at 21:32 , Graham Cox <email@hidden> wrote:

> C'mon, this has got to be easy, hasn't it?

Before iOS 6, the go-to cross-platform string drawing would be CoreText. For something like what you described, I'd suggest you look here:

	https://developer.apple.com/library/mac/#documentation/StringsTextFonts/Conceptual/CoreText_Programming/Operations/Operations.html#//apple_ref/doc/uid/TP40005533-CH4-SW18

under "Simple Text Labels".

Since iOS 6, NSAttributedString is probably your easiest cross-platform choice:

	https://developer.apple.com/library/ios/#documentation/UIKit/Reference/NSAttributedString_UIKit_Additions/Reference/Reference.html
	https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/Reference/Reference.html

and use something like 'drawAtPoint:...'

> The check mark has a unicode value of 0x2713, so can't be represented by a char.

In either of the above cases, you're using NS/CFString, so you can represent unicode easily. (You can even put the literal character in a string in your source code, by copying it from the special characters panel.)




_______________________________________________

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

References: 
 >Low-level text, why so hard? (From: Graham Cox <email@hidden>)

  • Prev by Date: Low-level text, why so hard?
  • Next by Date: Window resizing autolayout?
  • Previous by thread: Low-level text, why so hard?
  • Next by thread: Re: Low-level text, why so hard?
  • Index(es):
    • Date
    • Thread