Using NSNumber from NSNotification.userInfo[UIKeyboardAnimationCurveUserInfoKey]
In Objective C I would do the following
[UIView animateWithDuration:1.0
let animationKey = userInfo[UIKeyboardAnimationCurveUserInfoKey] as UInt UIViewAnimationOptions(rawValue: animationKey)