Skip to content

Instantly share code, notes, and snippets.

@telliott99
Created December 9, 2015 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save telliott99/7501da1a76b48a47cfca to your computer and use it in GitHub Desktop.
Save telliott99/7501da1a76b48a47cfca to your computer and use it in GitHub Desktop.
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet weak var window: NSWindow!
var mainWindowController: MainWindowController?
func applicationDidFinishLaunching(aNotification: NSNotification) {
// Create a window controller with a XIB file of the same name
let mainWindowController = MainWindowController()
// Put the window of the window controller on screen
mainWindowController.showWindow( self)
// Set the property to point to the window controller
self.mainWindowController = mainWindowController
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment