xcode - Get instance of main window controller in app delegate -
xcode - Get instance of main window controller in app delegate -
i know that, ios, can reference root view controller app delegate so:
var rootviewcontroller = self.window!.rootviewcontroller
how 1 reference main window controller app delegate when targeting os x? pass variable (the managed object context) way, have read solution referencing moc.
you can access nswindowcontroller instance of main nswindow this:
nsapplication.sharedapplication().mainwindow?.windowcontroller
xcode osx swift
Comments
Post a Comment