Using NSNumber from NSNotification.userInfo[UIKeyboardAnimationCurveUserInfoKey]
In Objective C I would do the following
[UIView animateWithDuration:1.0
Is this what you need?
UIViewAnimationCurve.fromRaw(Int(hereGoesYourStuff))
In Beta-5
UIViewAnimationOptions.fromRaw(
UInt(
( p.userInfo[ UIKeyboardAnimationCurveUserInfoKey ] as NSNumber ).unsignedIntValue << 16
)
)!
let animationKey = userInfo[UIKeyboardAnimationCurveUserInfoKey] as UInt
UIViewAnimationOptions(rawValue: animationKey)
You have to init a UIViewAnimationOptions with the rawValue like this:
UIView.animateWithDuration(1.0,
delay: 0,
options: UIViewAnimationOptions.init(rawValue:UInt(curveValue.intValue << 16)),