On Apr 9, 2015, at 13:28:33, Ken Thomases <[email protected]> wrote:
> 
> In a parent view, you could override the -layout method with something like 
> this to adjust it dynamically:
> 
> - (void) layout
> {
>    textField.preferredMaxLayoutWidth = 0;
>    [super layout]
>    textField.preferredMaxLayoutWidth = NSWidth([textField 
> alignmentRectForFrame:textField.frame]);
>    [super layout];
> }

Groovy! That works like a charm. I was curious, so I commented out the first 2 
lines, and it still works as expected. Do you think the reset to 0 and 
subsequent forced layout are necessary? Thanks again, Ken.

--
Steve Mills
Drummer, Mac geek


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to