图像

Swift 2 development template for OS X

Here’s just code use for myself.
First. override something

    override var windowNibName: String? {
        return "MainWindowController"
    }

Second. init in app

    var mwc:MainWindowController?


    func applicationDidFinishLaunching(aNotification: NSNotification) {
        // Insert code here to initialize your application
        let wc=MainWindowController()
        wc.showWindow(self)
        self.mwc=wc
    }

发表评论