I've got this code to shrink and move my controls when the keyboard opens:
-(void)keyboardWillShow:(NSNotification *)notification {
NSValue *value = [notification.userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey];
NSTimeInterval interval = 0;
[value getValue:&interval];
CGSize keyboardSize = [[notification.userInfo objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
[UIView animateWithDuration:interval animations:^{
self.composeBarBottomConstraint.constant = (-1) * keyboardSize.height;
[self.view layoutIfNeeded];
}];
}
This works perfect with the normal keyboard, but when I tap the emoji keyboard button the UI controls position isn't where it should be (offset upwards) and jumps rather than animating - making me think the values I retrieve from [notification userInfo]
is wrong with the emoji keyboard.
Any ideas what's going on here?