On Mar 23, 2017, at 13:45 , Daryle Walker <email@hidden> wrote:
Nope, unless the whole storyboard is corrupt. Making a new split-view controller (with 2 sub-views) and tab-view controller (with 2 sub-views), and adding the tab-view controller as a third pane works as far as segue connections, but the visuals are still locked, like the first time. What did you do to add the third VC? Maybe I’m doing it the wrong way.
To add the third split, I control-dragged from the blue controller icon at the top of the split VC scene on the canvas to a newly-added VC scene and chose the “split item” segue. Look at your object hierarchy on the left of the canvas. Do you have 3 split view items under the split VC’s view, and 3 relationships below that? If you do, your split view is structurally correct.
What happens when you go to the first of the original child views on the canvas, and drag its right margin narrower? Does the split divider in the split VC view also move? It should.
What I see *in the canvas* is that the split view is divided into splits proportional to the widths of the individual split item VCs. At run-time, I see splits that are based on the same proportions, but modified by the actual size available (due to the actual size of the window). If the window isn’t extremely big, I sometimes end up with two of the 3 splits proportionally reduced in size, and the other one collapsed.
This all seems correct. The split VC is starting with the design-time proportions, and resizing the split view (and hence split item views) according to the actual space available, all of this being done via autolayout (which also makes the result depend on the split view subviews, which may imply restrictions to possible split sizes, though I only have a single label in each split, in my test case). But the default split-view controller with two sub-views works just fine after dragging it out and connecting it to the window controller. Maybe I’ll do the full run-time constraint adjustment later, but why can’t I get the default set-up, with one swap out, to work now?
What does “works” mean? If you mean that you can run the app and see two equal-width splits, that’s because the split VC does that at runtime, in the absence of any information that would make one side larger or smaller. What *doesn’t* work then? I mean, what are the actual symptoms at run time?
I’ve also lost track of what “swap” means. Does this refer to adding a third split and then deleting the second one?
Is it possible you’ve checked “collapsed” for one of the split items in IB? What happens if you change your divider style to “thick” so you can see more clearly where the dividers are? Collapsed thick dividers are still completely visible.
If you have no other recourse, you can try using Xcode’s view debugger to see where the views are. If something is being clipped away, you should be able to see that.
|