title: Different UIKeyCommand arrays for different view controllers in Swift
body: <p>I have a problem with <code>UIKeyCommand</code> in Swift. I have two <code>UIViewVontroller</code>, <code>ProjectsViewController</code> and <code>ViewController</code>. I'm opening <code>ViewController</code> from <code>ProjectsViewController</code> using this code:</p>
  
  <pre><code>let editor = self.storyboard?.instantiateViewController(withIdentifier: "editor")
  self.present(editor!, animated: true, completion: nil)
  </code></pre>
  
  <p>In my <code>ProjectsViewController</code> class I have some <code>UIKeyCommands</code>:</p>
  
  <pre><code>override var keyCommands: [UIKeyCommand]?
  {
    if #available(iOS 9.0, *)
    {
      return [
        UIKeyCommand(input: "n", modifierFlags: .command, action: #selector(projectWizard), discoverabilityTitle: "Create new project"), UIKeyCommand(input: "t", modifierFlags: .command, action: #selector(toolsAction), discoverabilityTitle: "Open Tools"), UIKeyCommand(input: ",", modifierFlags: .command, action: #selector(settingsAction), discoverabilityTitle: "Open Settings"), UIKeyCommand(input: "i", modifierFlags: .command, action: #selector(aboutAction), discoverabilityTitle: "About")
      ]
    }
    else
    {
      return nil
    }
  }
  </code></pre>
  
  <p>And in <code>ViewController</code> I have another:</p>
  
  <pre><code>override var keyCommands: [UIKeyCommand]?
  {
    if #available(iOS 9.0, *)
    {
      return [
        UIKeyCommand(input: "n", modifierFlags: .command, action: #selector(addFileAction), discoverabilityTitle: "New file"), UIKeyCommand(input: "r", modifierFlags: .command, action: #selector(runProject), discoverabilityTitle: "Build and run"), UIKeyCommand(input: "w", modifierFlags: .command, action: #selector(closeProject), discoverabilityTitle: "Close window")
      ]
    }
    else
    {
      return nil
    }
  }
  </code></pre>
  
  <p>When my app presents <code>ProjectsViewController</code>, I've pressed cmd for Discoverability on my iPad, and it presents combinations for <code>ProjectsViewController</code>, but after I've opened <code>ViewController</code> and press cmd, Discoverability shows both combinations for <code>ProjectsViewController</code> and <code>ViewController</code>. How can I separate keyboard shortcuts for every class? Thank you for your attention. </p>