Re: Split view priority
Re: Split view priority
- Subject: Re: Split view priority
- From: Quincey Morris <email@hidden>
- Date: Fri, 22 Apr 2016 21:19:01 -0700
- Feedback-id: 167118m:167118agrif8a:167118sJUC6Xh8Mo:SMTPCORP
On Apr 22, 2016, at 18:56 , Ken Thomases <email@hidden> wrote:
>
> After that, what is the design-time size of the left split view and the window? You should set them to the default configuration. The window will stay that way so long as there are no constraints of priority 500 (NSLayoutPriorityWindowSizeStayPut) or greater that force it to another size (or the user resizes it manually, of course).
Thanks for your help. With your hint to look at design widths, I think I figured it out. The problem was the extra container view in the hierarchy (B, below). The actual hierarchy looked like this, with each lettered item being its own scene in the storyboard, with its own controller:
> A. Window content view (1000 design width) -> B. Container view -> C. Split view (left + right)
> C. Split view (left) -> D. Source list (outline view): width >= 70 @1000, width >= 300 @249
> C. Split view (right) -> E. Tab view -> F. Tab item view -> G. Table view: width >= 700 @1000
The problem was that container view B had a design width smaller than 1000, under the assumption that it wouldn’t matter what it was, but it did. Changing that design width to 1000 made everything work correctly.
What’s confusing is that the split view, the tab view and the tab item view all have random design widths that don’t seem to matter, which is what led me to believe that none of the design widths mattered. Turns out, when they matter, they matter, when they don’t, they don’t.
(The reason the container view is a scene with a view controller is that, in a storyboard, if you place a split view in a subview, you don’t get a NSSplitViewController for it. Instead, you have to put a container view in the subview, and do an ‘embed’ segue to the split view scene.)
_______________________________________________
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