Re: stringWithFormat / Rendering Text (iOS)
Re: stringWithFormat / Rendering Text (iOS)
- Subject: Re: stringWithFormat / Rendering Text (iOS)
- From: Jason Teagle <email@hidden>
- Date: Thu, 24 May 2012 13:36:20 +0100
- Organization: Organised Bytes Software
Have a look at this doc-page:
https://developer.apple.com/library/mac/ipad/#documentation/graphicsimaging/
>conceptual/drawingwithquartz2d/dq_text/dq_text.html
It discusses your options when drawing text with Quartz2D, and also mentions
>other techniques.
>One option of note is the NSString additions for UIKit for
>drawing text, which does most of what you want "out of the box".
I did read the document you mentioned (thanks for the link), it was
where I got the CGContextXXX versions from. Unfortunately, although it
mentions 'the Cocoa way' and the additions (or I might have seen about
the additions in other bits I read), there were no samples or links to
them (at least, not in the copy of that page that is part of the
documentation that comes with Xcode).
Having had a go from the CGContextXXX sample myself and got gibberish, I
felt I had to ask here for some help. The problem might simply be the
name of the font I'm using. 'Arial' produces the gibberish, 'Chicago'
(harvested from another sample I found on the web) gives me a blank.
Again, the docs for CGContextSelectFont() don't provide a link to what
names are acceptable for the parameter.
Luckily, I found another sample later that did it the Cocoa way and
after a little trial and error, I got it working.
--
Jason Teagle
_______________________________________________
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