             keyboardFinalFrameValue = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue else {
                 return
         }
-        let keyboardFinalFrame = keyboardFinalFrameValue.CGRectValue()
-        
-        // In case the keyboard is hidden, don't continue.
-        // This happens when running in the simulator with the keyboard hidden
-        // or when running in an iPad with a hardware keyboard connected.
-        guard !CGRectIsEmpty(keyboardFinalFrame) else  { return }
         
         guard let duration = userInfo[UIKeyboardAnimationDurationUserInfoKey] as? NSTimeInterval,
             animationCurveRaw = userInfo[UIKeyboardAnimationCurveUserInfoKey] as? UInt else {

        }
        
        let animationCurve = UIViewAnimationOptions(rawValue: animationCurveRaw)
        
        UIView.animateWithDuration(
            duration,

    }
    
    func keyboardWillHide(notification: NSNotification) {
        
        // In case the keyboard is hidden, don't continue.
        // This happens when running in the simulator with the keyboard hidden
        // or when running in an iPad with a hardware keyboard connected.
        guard !CGRectIsEmpty(originalFrame) else  { return }
        
        guard let userInfo = notification.userInfo else { return }
        guard let duration = userInfo[UIKeyboardAnimationDurationUserInfoKey] as? NSTimeInterval,
