I have a user interface that needs some position settings when the keyboard is displayed.
When a keyboard is detected, the following is displayed:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
Note. I tried with both UIKeyboardWillShowNotification and UIKeyboardDidShowNotification
- (void)keyboardWillShow:(NSNotification *)n { if (isKeyboardShowing) return; NSDictionary* userInfo = [n userInfo];
For custom keyboards, the keyboard size returns {320, 0}. Since the keyboard can now have different heights, I cannot have static values ββto change the user interface when the keyboard is displayed.
Is this a problem with ios8? and are there any other methods for dynamically increasing the height of the keyboard?
Edit: this is a UserInfo Dict:
{name = UIKeyboardDidShowNotification; userInfo = { UIKeyboardAnimationCurveUserInfoKey = 7; UIKeyboardAnimationDurationUserInfoKey = "0.25"; UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {320, 0}}"; UIKeyboardCenterBeginUserInfoKey = "NSPoint: {160, 568}"; UIKeyboardCenterEndUserInfoKey = "NSPoint: {160, 568}"; UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 568}, {320, 0}}"; UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 568}, {320, 0}}"; }}
Thanks in advance.
ios objective-c ios8 xcode6 keyboard
Treetree
source share