         }
         
         let animationCurve = UIViewAnimationOptions(rawValue: animationCurveRaw)
+        let keyboardFinalFrame = keyboardFinalFrameValue.CGRectValue()
         
         UIView.animateWithDuration(
             duration,

    }
    
    func keyboardWillHide(notification: NSNotification) {
        
        guard let userInfo = notification.userInfo else { return }
        guard let duration = userInfo[UIKeyboardAnimationDurationUserInfoKey] as? NSTimeInterval,

            keyboardFinalFrameValue = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue else {
                return
        }
        
        guard let duration = userInfo[UIKeyboardAnimationDurationUserInfoKey] as? NSTimeInterval,
            animationCurveRaw = userInfo[UIKeyboardAnimationCurveUserInfoKey] as? UInt else {
