title: Getting the frame of the keyboard at the window level
body: <p>I am trying to get the coordinates of the frame of the keyboard at window level to be compared with a TableCell to make minor adjustments in scrolling so a selected TextField in the cell wont be behind the keyboard or the header.</p>
  
  <p>However I am having issue getting the x,y coordinates for the keyboard at window level, they simply return 0,0 (origin) which is not true.  Or if it is, is not what I need.</p>
  
  <p>I am using the lines:</p>
  
  <pre><code>CGRect keyboardFrame = [self.view.window convertRect:_numericKeyboardView.frame toView:nil];
  NSLog(@"Keyboard Frame: %f, %f, %f, %f", keyboardFrame.origin.x, keyboardFrame.origin.y, keyboardFrame.size.width, keyboardFrame.size.height);
  </code></pre>
  
  <p>which produces the output(for portrait):</p>
  
  <pre><code>Keyboard Frame: 0.000000, 0.000000, 768.000000, 264.000000
  </code></pre>
  
  <p>when it should be more like:</p>
  
  <pre><code>Keyboard Frame: 415.000000, 0.000000, 768.000000, 264.000000  
  </code></pre>
  
  <p>Any ideas on how to get the correct keyboard coordinates? </p>