Are we (NSViewController view) the First Responder?

In some cases a class may want to know if it’s the first responder before triggering an action.

For instance if several loaded View Controller classes are listening for the same notification, how can they know which one should trigger the action? Well… they should ask their view. 

In this case a NSTableView class is asking if it’s currently the first responder:

        if (self.view.window?.firstResponder == self.tableView){



And that’s it 🙂

Questions / comments? I’m at @MarcMasVi