Re: CTFrame and drawing text + layers.
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