Ileana D'Cruz
Ileana D'Cruz

Reputation: 274

get windowController for a window

I able to find current opened window as :

NSWindow *currentWindow = [NSApp keyWindow];

But how can i know which class controls this window, i.e. Window controller for the above window?

Upvotes: 0

Views: 1401

Answers (1)

Anoop Vaidya
Anoop Vaidya

Reputation: 46543

Try this one :

 NSLog(@"WindowController is : %@",[[currentWindow windowController] class]);

Upvotes: 1

Related Questions