https://stackoverflow.com/a/28334583/4107801
I tried the method mentioned in this answer but it crashes with bad access every time.
Maybe the private APIs have changed or I'm simply implementing it incorrectly. Here is my implementation:
override func loadView() {
view.frame = CGRect(origin: CGPoint(x: 100, y: 100), size: CGSize(width: 1000, height: 1000))
//view = self.view
splitView = NSSplitView(frame: view.frame)
splitView?.autoresizingMask = .ViewWidthSizable | .ViewHeightSizable
splitView?.setPosition(300, ofDividerAtIndex: 0)
view.addSubview(splitView!)
}