Re: simple CATextLayer scaling problem
Re: simple CATextLayer scaling problem
- Subject: Re: simple CATextLayer scaling problem
- From: Kyle Sluder <email@hidden>
- Date: Mon, 10 May 2010 16:35:05 -0700
On Mon, May 10, 2010 at 3:45 PM, douglas welton
<email@hidden> wrote:
> I would suggest that you use KVO to observe the value of the bounds property of your layer. When you are notified of the property change, compute the new size for your font at that point.
CALayer is not KVO-compliant for its properties.
> you may be able to do this rather easily by setting the layers needsDisplayOnBoundsChange property to YES. This should trigger a call to the layer's delegate with a -drawLayer:inContext message (where you can compute the font size as needed).
This has nothing to do with KVO, but it will work.
> Alternately, you may be able to use the -actionForLayer: delegate message as well. I'm not sure if there is an action for bounds change, but it's worth a check.
There is no action key for bounds change.
--Kyle Sluder
_______________________________________________
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