I had been doing something like this to mimic the keyboard animation on older version of iOS.
CGRect keyboardBeginFrame;
[[note.userInfo objectForKey:UIKeybo
You can use animateWithDuration block and set curve inside it. It's clean and work well.
UIViewAnimationCurve curve = [[notification.userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue];
double duration = [[notification.userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue];
[UIView animateWithDuration:duration
delay:0
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{
[UIView setAnimationCurve:curve];
/* ANIMATION HERE */
// don't forget layoutIfNeeded if you use autolayout
}
completion:nil];
Happy coding!
UPDATE
You can use a simple UIViewController category written by me https://github.com/Just-/UIViewController-KeyboardAnimation