title: How to find keyboard height using Swift
body: <pre><code>let frame = (info[UIKeyboardFrameEndUserInfoKey] as NSValue) as CGRect
  </code></pre>
  
  <p>does not work. Anybody know why this does not function as expected?</p>
  
  <p>Error: 'NSValue' not convertible to 'CGRect'</p>
  
  <p>Keep in mind that something like:</p>
  
  <pre><code>let curve = (info[UIKeyboardAnimationCurveUserInfoKey] as NSValue) as UInt
  </code></pre>
  
  <p>works fine.</p>
  
  <p>Edit: Even Apple documentation indicates this is a glitch because of the following comment in Cocoa for <code>UIKeyboardAnimationCurveUserInfoKey</code></p>
  
  <pre><code>// NSValue of CGRect
  </code></pre>
  
  <p>Edit2: The debugger defines it as an NSConcreteValue. How can I convert it to a CGRect?</p>