11 okt 2008 kl. 22.34 skrev David Hoerl:


I'm using a CATextLayer to display some text which the user can change the font size of. When the user changes the font size, I still want my text to be centered, both vertically and horizontally. As far as I know you can only set the the CATextLayers alignmentMode to kCAAlignmentCenter to get it centered on one of the axis (I never know which one is which), but is there any way that it can be centered on both axis?

Yours sincerely,
Tim Andersson


Well, I had this same issue earlier this year, and did find a "hack" - look in the archives for:

Vertically centering text in a CATextLayer Q&A

[As an aside, its usually worth doing a quick search on google - in this case for "CATextLayer" - my earlier post is 8th on the first page.]

David

Thank you, David! Just what I needed.

Hmm, I did search Google and the archives before posting, but guess I didn't search well enough.

Kind regards,
Tim Andersson
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to