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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -