title: How can I programmatically check whether a keyboard is present in iOS app?
body: <p>I need to check the condition of keyboard visibility in my iOS app.</p>
  
  <p>Pseudocode:</p>
  
  <pre><code>if(keyboardIsPresentOnWindow) {
      //Do action 1
  }
  else if (keyboardIsNotPresentOnWindow) {
      //Do action 2
  }
  </code></pre>
  
  <p>How can I check this condition?</p>