In OS X applications, there is no concept of "rootViewController". This is because applications consist of one or more windows and / or a menu bar, none of which are the βrootβ.
However, you can find a window controller, starting with a view controller:
[[[self view] window] delegate];
If you want to call custom methods on a window controller, it might be better to create a delegate so that the assumptions about the controller aren't in trouble.
the equivalent of NSViewController.alloc.initWithNibName(nil, bundle: nil) would be:
[[NSViewController alloc] initWithNibName:nil bundle:nil];
The method call is enclosed in square brackets, methods with several parameters are just label1:parameter1 label2:parameter2...
Usually, however, you will have your own subclass of NSViewController , which you will create instead.
source share