• 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: when has AutoLayout finished its work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >when has AutoLayout finished its work? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: when has AutoLayout finished its work? (From: Ken Thomases <email@hidden>)
 >Re: when has AutoLayout finished its work? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: when has AutoLayout finished its work? (From: Ken Thomases <email@hidden>)
 >Re: when has AutoLayout finished its work? (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: when has AutoLayout finished its work?
  • Next by Date: Nonsandboxed app documents won't open from iCloud Drive?
  • Previous by thread: Re: when has AutoLayout finished its work?
  • Next by thread: Nonsandboxed app documents won't open from iCloud Drive?
  • Index(es):
    • Date
    • Thread