So I have an application featuring a chat section, and I\'m synchronizing the animation of the keyboard hiding and showing with the rise and fall of the
keyboardWillShow:
NSDictionary *info = [notification userInfo];
CGRect keyboardFrame = [info[UIKeyboardFrameEndUserInfoKey] CGRectValue];
NSTimeInterval duration = [info[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
UIViewAnimationCurve curve = [info[UIKeyboardAnimationCurveUserInfoKey] integerValue];
[self layoutIfNeeded];
[UIView animateWithDuration:duration delay:0 options:(curve << 20) animations:^{
[self.keyboardConstraint setConstant:keyboardFrame.size.height];
[self layoutIfNeeded];
} completion:nil];