• 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: CTFrame and drawing text + layers.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CTFrame and drawing text + layers.


  • Subject: Re: CTFrame and drawing text + layers.
  • From: John Clayton <email@hidden>
  • Date: Tue, 20 Nov 2007 10:26:13 +0100

that was *exactly* what I needed by the way - THANK YOU.


On 19/11/2007, at 7:49 PM, John Harper wrote:

You could try overriding the -preferredFrameSize method to something like this:

- (CGSize)preferredFrameSize
{
CGSize sz = CGSizeApplyAffineTransform ([self bounds].size, [self affineTransform]);
sz.width = ceil (sz.width); sz.height = ceil (sz.height);
return sz;
}


this will tell the layout manager that the text layer's ideal size is its current size. It may still get resized depending on how the parent's layout manager has been configured,

	John


On Nov 19, 2007, at 9:39 AM, John Clayton wrote:

Hi

I want to stop the CATextLayer from adjusting the boundaries of my text when I've got text wrapping turned on and the parent layer has a layout manager attached to it. I'd like the CATextLayer simply to use the boundaries that I provide it.

The docs state:
Note: When a CATextLayer instance is positioned using the CAConstraintLayoutManager Class Reference the bounds of the object is resized to fit the text content.


Is there a way of forcing it NOT to do this somehow? Something I can override perhaps?

--
John Clayton
http://www.coderage-software.com/



_______________________________________________

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


_______________________________________________

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


References: 
 >CTFrame and drawing text + layers. (From: John Clayton <email@hidden>)
 >Re: CTFrame and drawing text + layers. (From: John Harper <email@hidden>)

  • Prev by Date: Re: have Leopard functionality and still run on Tiger
  • Next by Date: Re: How to know OS Version
  • Previous by thread: Re: CTFrame and drawing text + layers.
  • Next by thread: Huge increase in memory usage on Leopard
  • Index(es):
    • Date
    • Thread