Get instance of main window controller in app delegate
You can access the NSWindowController instance of the main NSWindow like this:
NSApplication.sharedApplication().mainWindow?.windowController
You can access the NSWindowController instance of the main NSWindow like this:
NSApplication.sharedApplication().mainWindow?.windowController