Re: Auto Layout & Stacked NSTextViews
Re: Auto Layout & Stacked NSTextViews
- Subject: Re: Auto Layout & Stacked NSTextViews
- From: Keary Suska <email@hidden>
- Date: Sun, 26 May 2013 14:58:06 -0600
On May 26, 2013, at 1:26 PM, Fritz Anderson wrote:
> On 26 May 2013, at 12:31 PM, Keary Suska <email@hidden> wrote:
>
>> I have a layout problem that I would think auto layout was designed to solve but I can't seem to get it to work. In short, I have three NSTextViews aligned vertically (with NSTextField labels between them) and I want them all to grow vertically but keep the space between them. The best I can get is to grow the bottom one, but the two above don't want to budge. Is there a trick to getting this to work, or is auto layout just not up to the task?
>
> My quick experiment says:
>
> A top fixed to top of container
> B top fixed to bottom of A; height == height of A
> C top fixed to the bottom of B; height == height of B; bottom fixed to bottom of container.
>
> Delete all other vertical constraints; the above appears to be sufficient and consistent, so IB won't fight you. The Cocoa layout instrument doesn't see anything wrong.
>
> That's what I found in about three minutes. It worked for me.
Thanks for that--it was because one of my views was taller than the other two (by design). Making them all the same height, then pinning height equal, is what did the trick.
Is there comprehensive documentation somewhere? My search only brought up only rudimentary or code-only information.
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden