• 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
CATextLayers text alignment?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CATextLayers text alignment?


  • Subject: CATextLayers text alignment?
  • From: David Hoerl <email@hidden>
  • Date: Sat, 11 Oct 2008 16:34:12 -0400


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
_______________________________________________

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


  • Follow-Ups:
    • Re: CATextLayers text alignment? [SOLVED]
      • From: Tim Andersson <email@hidden>
  • Prev by Date: Re: Searching a CoreData bound NSArrayController
  • Next by Date: Re: CATextLayers text alignment? [SOLVED]
  • Previous by thread: CATextLayers text alignment?
  • Next by thread: Re: CATextLayers text alignment? [SOLVED]
  • Index(es):
    • Date
    • Thread