Split view priority
Split view priority
- Subject: Split view priority
- From: Quincey Morris <email@hidden>
- Date: Fri, 22 Apr 2016 17:15:09 -0700
- Feedback-id: 167118m:167118agrif8a:167118s6xQahQxjJ:SMTPCORP
I have a window that contains a split view of 2 split items. The item on the left is a source list whose width constraint is '>= 70’ @priority 1000. The item on the right is a view whose width constraint is '>= 700’ @priority 1000. The window itself has no minimum size specified in IB or any other way.
What I want is for the left split to start out at width 300, and the right split to start out at width 700. That is, the left split is larger than its minimum size, while the right split is at its minimum size. Then, resizing the window should resize the right split only, as far as possible, compressing the left split down from 300 only when the window gets smaller than its original size. I can achieve that by setting the left split’s holding priority to 751, vs. 750 for the right split. That “preference” for resizing the right split item works.
The problem is, the window is always 770 (70 + 700) wide when it opens, not the desired 1000 (300 + 700). There is no state restoration ATM, so that’s not a factor. IOW, the window is opening at its minimum possible width.
OK, so I said the width 300 on the left was what I “want”, but so far I didn’t do anything to achieve that. Now, if I add a width constraint ‘>= 300’ to the source list on the left, and set its priority to 251 or below, I get the same behavior (initial width 70). If I set its priority to 252 or above, the window opens at the desired size (1000), but the left split item can no longer be resized smaller than 300. The original width constraint ‘>=70’ @priority 1000 is still there.
What do I have to do to get the window to open at a width other than its minimum? I’m not sure if this is something I need to do to the split view, or possibly if it’s something I need to do to the window.
(My window architecture is slightly simplified in this description. There’s actually a nested controller/view combination between the window and the split view, but AFAIK I don’t have any constraints anywhere else that will affect the window size.)
_______________________________________________
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