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 19:57:34 +0100
- Organization: Organised Bytes Software
Thanks for all the replies regarding %s vs. %@, and the rather
disastrous attempt at using CGContextXXX methods. Even if I had fixed
all the other issues, I was using CGContextSelectFont incorrectly
anyway. I didn't have a hope. That, unfortunately, is down to
documentation not being complete / clear enough - or hiding the big
picture in a multitude of different places making it hard to piece
together.
If the CGContextXXX methods shouldn't be used, then they shouldn't be in
the API - or should be marked as deprecated. There's nothing in the docs
(with Xcode 3.X, at least - maybe it's changed since) to indicate that
these were the worst way possible to render text. If you're trying to
learn this stuff from the docs it's pretty discouraging to be led
astray. People (elsewhere, not saying anyone here did it) like to tell
us to RTFM but that just shows you where that got me.
If they had just given me a clean, working sample using
-drawAtPoint:withFont: (in the 'How to draw text' section) none of this
would have happened... but then I wouldn't have learned as much {:v)
Onward and upward...
--
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