I have created a Cocoa application in Xcode6 which uses storyboards. As a template, Xcode provides a window for the application. I want to add a second window to show when the p
swift 4 version :
var monitorcontroler: NSWindowController!
override init() {
super.init()
let mainStoryboard = NSStoryboard.init(name: NSStoryboard.Name(rawValue: "Main"), bundle: nil)
monitorcontroler = mainStoryboard.instantiateController(withIdentifier: NSStoryboard.SceneIdentifier(rawValue: "moniteur")) as! NSWindowController
monitorcontroler.showWindow(self)
}