I want to know how to open a new window on button click in Cocoa Mac Programming. Help me. I am doing a mac application which needs to open a new mac window on particular bu
Swift 3: In your storyboard go to WindowController -> Identity inspector -> storyBoardID: fill out: mainWindow. Then from your current viewcontroller link the button on the storyboard to the following method:
@IBAction func newWindow(_ sender: Any) {
let myWindowController = self.storyboard!.instantiateController(withIdentifier: "mainWindow") as! NSWindowController
myWindowController.showWindow(self)
}