Re: when has AutoLayout finished its work?
Re: when has AutoLayout finished its work?
- Subject: Re: when has AutoLayout finished its work?
- From: Jonathan Mitchell <email@hidden>
- Date: Wed, 26 Nov 2014 11:10:32 +0000
> On 26 Nov 2014, at 09:26, Gerriet M. Denkmann <email@hidden> wrote:
> You said: "have your view class report an intrinsic size" - how would I do this?
> The documentation says something how to set "intrinsic content size" but it adds that "The view will not have this ... size at runtimeā.
Just override NSView - (NSSize)intrinsicContentSize.
You can also override -fittingSize to give a minimal size.
> Can one set an intrinsic size at runtime, to be used by auto layout?
Sure. just call your views -invalidateIntrinsicContentSize.
AutoLayout will do its think and call -intrinsicContentSize as part of its layout.
J
_______________________________________________
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