• 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
Re: simple CATextLayer scaling problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: simple CATextLayer scaling problem
      • From: Scott Anguish <email@hidden>
    • Re: simple CATextLayer scaling problem
      • From: douglas welton <email@hidden>
References: 
 >simple CATextLayer scaling problem (From: "Julian." <email@hidden>)
 >Re: simple CATextLayer scaling problem (From: Kyle Sluder <email@hidden>)
 >Re: simple CATextLayer scaling problem (From: "Julian." <email@hidden>)
 >Re: simple CATextLayer scaling problem (From: douglas welton <email@hidden>)

  • Prev by Date: Re: simple CATextLayer scaling problem
  • Next by Date: Re: Overriding text size in NSTextStorage
  • Previous by thread: Re: simple CATextLayer scaling problem
  • Next by thread: Re: simple CATextLayer scaling problem
  • Index(es):
    • Date
    • Thread