FROM : John Harper
DATE : Mon Nov 19 19:49:48 2007
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_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
DATE : Mon Nov 19 19:49:48 2007
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_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| John Clayton | Nov 19, 18:39 | |
| John Harper | Nov 19, 19:49 | |
| John Clayton | Nov 20, 10:26 |






Cocoa mail archive

