Re: Hierarchical split views and auto layout
Re: Hierarchical split views and auto layout
- Subject: Re: Hierarchical split views and auto layout
- From: Quincey Morris <email@hidden>
- Date: Mon, 08 Feb 2016 21:56:34 -0800
- Feedback-id: 167118m:167118agrif8a:167118s5MT7HQ7ga:SMTPCORP
On Feb 8, 2016, at 15:07 , Dragan Milić <email@hidden> wrote:
>
> I’d be very thankful to anyone having the time to look at the video and try to figure out what could be the root of the problem. If after watching anyone has questions about implementation, code, etc, I’d be happy to provide more information.
I’m really lousy at understanding autolayout, but I did finally go watch the video, and I think the problem is that your layout is ambiguous — though perhaps not in a way that autolayout thinks is worth complaining about.
Your argument on how the more complex vertical split structure should work is hierarchical — you expect that the 2 parts of the outer split should resize proportionally, and then that the 2 parts of the inner split should resize proportionally *within the proportionate resizing already done*. This isn’t my understanding of how autolayout works.
AFAIK, autolayout considers all constraints with priority 250 equally, regardless of where they come from. If that’s true, then vertical resizing sees 3 areas that can stretch vertically, all with priority 250. Since there are no other constraints on this, autolayout can do whatever it wants with the pieces, with the results you saw. I don’t think it’s obliged to “share” the pain equally between the candidate adjustments, although it may do so if it thinks that’s the best compromise.
What happens if you decrease the holding priority by 1 for each level of nesting in your split views? It sorta seems to me that should do what you want.
But, as I say, autolayout confounds me, and autolayout in split views confounds me even more, so …
_______________________________________________
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