Re: Low-level text, why so hard?
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