I have a window in the storyboard and a box in defined a xib file. I would like to see the box appearing on the window as soon as the app launches.
The box is also defined by a custom cocoa class that I created and I associated to the xib file. The class is called Box.
Why does the code in the picture doesn't show the box in the window? The code is in the NSViewController of the window. Thank you
Try to replace
window.addSubview(box)
withself.view.addSubview(box)
.You need to display your view as a subview of your root view controller.