I am trying to open a new window in my Swift application but I cannot get it to open.
class AppDelegate: NSObject, NSApplicationDelegate { func applicat
After the openMyWindow() method is executed, the windowController will be released and consequently the window is nil. That's why it is not there.
openMyWindow()
You have to hold the window in you class to keep it alive, then the window will be visible.
var windowController : NSWindowController?