Swift: How can I open a new window clicking a button?
问题 I'm new with this programming language and I'd like to create an application that opens a window with some information when I click a button but I don't know how to do that. I'm not working with storyboards because I read that for professional programming these doesn't work. I don't want for iOS, I'd like it to be for OS X. Regards to all! 回答1: Thats pretty simple. You can do as follow: import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet weak var