CATextLayer and preferredFrameSize
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