Search code examples
swiftxcodemacosxcode-storyboard

Swift storyboards: split view controller not showing properly on MacOS


I am trying to implement a split view controller using storyboards & swift on MacOS:

xcode screenshot

For some reason only the right side shows up. Any ideas ?


Solution

  • It's actually a window size issue. As it is undefined it push the left side out of view. Just place the cursor on the left side and drag to show the left view.

    shot

    Hope it helps.


    UPDATE:

    It's actually NOT a window size issue. It looks like that the split view controller push one side out of view by default. Conversely, I was able to view the two panes correctly using the split view component inserted into a view controller.

    screen

    I'll be checking for information about this issue in the latest WWDC:

    https://developer.apple.com/videos/wwdc/2014/?id=212

    https://developer.apple.com/videos/wwdc/2014/?id=214


    UPDATE 03/11/14:

    After minute 07:00 of the first screencast I got what was going on. Take a look at the screenshot below:

    1. Make the Split View Controller as wide as the main window.
    2. Resize the Split View Items.
    3. Click on the items with the right most Split View Item, add Missing Constraints from the Pin pop up menu.

    solution

    It may take few tries before you get it right. I tested it three times and it did work.