• 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
CATextLayer and preferredFrameSize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CATextLayer and preferredFrameSize


  • Subject: CATextLayer and preferredFrameSize
  • From: email@hidden
  • Date: Tue, 1 Jul 2008 14:59:35 +0000
  • Importance: Normal
  • Sensitivity: Normal

Does CATextLayer override preferredFrameSize to always return a size that accomodates the text in it?

I'm adding a CATextLayer, say myTextLayer, to a parent layer which uses a custom layout manager. In the custom layout manager's layoutSublayersOfLayer: method, I'm setting the frame of the text layer so that it's width fits inside the parent layer.

Calling myTextLayer.frame.size.width returns the width that was set by the parent's layout manager. Calling myTextLayer.preferredFrameSize.width returns a size that matches the size of the text.

- Kevin
Sent via BlackBerry by AT&T
_______________________________________________

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

  • Prev by Date: [Q] Status Bar icon and Tiger
  • Next by Date: Displaying NSArray in NSTableView
  • Previous by thread: Re: [Q] Status Bar icon and Tiger
  • Next by thread: Displaying NSArray in NSTableView
  • Index(es):
    • Date
    • Thread