title: UIKeyboardAnimationDurationUserInfoKey returns extremely small value
body: <pre><code>func keyboardWillShow(notification:NSNotification){
      let userInfo = notification.userInfo
      let keyboardFrame = userInfo?[UIKeyboardFrameEndUserInfoKey] as NSValue
      let keyboardSize = keyboardFrame.CGRectValue().size
      let animationDurationValue = userInfo?[UIKeyboardAnimationDurationUserInfoKey] as NSValue
      var animationDuration : NSTimeInterval = 0
      animationDurationValue.getValue(&amp;animationDuration)
  
      self.keyboardDelegate?.keyboardWillShowWithSize(keyboardSize, andDuration: animationDuration)
    }
  </code></pre>
  
  <p>In my program, I try to reposition my view when keyboard appears using the function above. With  the same way of getting keyboard animation duration in my objective-c code. This one gives me the following status:</p>
  
  <pre><code>duration 5.18065378653631e-315
  </code></pre>
  
  <p>This is an abnormally small value. Where have I done wrong? Please help!</p>
  
  <p>EDIT: For complete code:</p>
  
  <pre><code>import Foundation
  import UIKit
  
  @objc protocol LPKeyboardViewControllerDelegate {
    func keyboardWillShowWithSize(size:CGSize, andDuration duration:NSTimeInterval)
    func keyboardWillHideWithSize(size:CGSize,andDuration duration:NSTimeInterval)
  }
  
  /**
  This view controller will move up its view when a keyboard appears in its view
  */
  class LPKeyboardViewController: UIViewController {
    var keyboardDelegate: LPKeyboardViewControllerDelegate?
  
    // MARK: - Lifecycle
    override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
      NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillShow:", name: UIKeyboardWillShowNotification, object: nil)
      NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillHide:", name: UIKeyboardWillHideNotification, object: nil)
  
      println("Start listening to keyboard")
    }
  
    func keyboardWillShow(notification:NSNotification){
      let userInfo = notification.userInfo
      let keyboardFrame = userInfo?[UIKeyboardFrameEndUserInfoKey] as NSValue
      let keyboardSize = keyboardFrame.CGRectValue().size
      let animationDurationValue = userInfo?[UIKeyboardAnimationDurationUserInfoKey] as NSValue
      var animationDuration : NSTimeInterval = 0
      animationDurationValue.getValue(&amp;animationDuration)
  
      self.keyboardDelegate?.keyboardWillShowWithSize(keyboardSize, andDuration: animationDuration)
    }
  
    func keyboardWillHide(notification:NSNotification){
      let userInfo = notification.userInfo
      let keyboardFrame = userInfo?[UIKeyboardFrameEndUserInfoKey] as NSValue
      let keyboardSize = keyboardFrame.CGRectValue().size
      let animationDurationValue = userInfo?[UIKeyboardAnimationDurationUserInfoKey] as NSNumber
      var animationDuration : NSTimeInterval = animationDurationValue.doubleValue
  
      self.keyboardDelegate?.keyboardWillHideWithSize(keyboardSize, andDuration: animationDuration)
  
    }
  
  
  }
  </code></pre>