Quick Storyboards: Split View Controller Does Not Display Properly

Trying to implement a split view controller using storyboard and fast:

enter image description here

For some reason, only the right side appears. Any ideas?

+5
source share
2 answers

This is a problem with window size. Since it is undefined, it pushes the left side out of view. Just place the cursor on the left side and drag to display the left view.

shot

Hope this helps.


UPDATE:

Actually NOT a problem with window size. It appears that the split view controller disconnects one side by default. And vice versa, I was able to view the two panels correctly using the split view component inserted into the view controller.

screen

I will check the 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 07:00 minutes of the first screencast, I got what was happening. Take a look at the screenshot below:

  • Make the Split View Controller wider than the main window.
  • Resize the elements .
  • Click on the items with the best split object , add Missing Restrictions from the Pin pop-up menu.

solution

It may take a few tries before you fix it. I tested it three times and it really worked.

+1
source

enter image description here

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/index.html#//apple_ref/doc/uid/20001093

NSSplitViewDelegate

class SplitViewController: NSSplitViewController {//, NSSplitViewDelegate

Quick Storyboards: An open list controller does not display properly

It was really a problem for me. Now I have solved this problem in my code.

1.Create an advanced class NSSplitViewController. 2. Define the class created in phase1 as the custom class on your SplitView that you created in the StoryBord. 3.call MySplitView.adjustSubviews () inside viewDidLoad ().

import Cocoa class SplitViewController: NSSplitViewController{//,NSSplitViewDelegate @IBOutlet weak var MySplitView: NSSplitView! override func viewDidLoad() { super.viewDidLoad() MySplitView.adjustSubviews(); } override func splitView(splitView: NSSplitView, constrainMinCoordinate proposedMinimumPosition: CGFloat, ofSubviewAt dividerIndex: Int) -> CGFloat { return proposedMinimumPosition + 200 } } 
+1
source

Source: https://habr.com/ru/post/1206066/


All Articles