diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 21fa142183..4c075fd35b 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -190,8 +190,8 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse { object:nil]; [center addObserver:self - selector:@selector(keyboardFrameDidChange:) - name:UIKeyboardDidShowNotification + selector:@selector(keyboardWillChangeFrame:) + name:UIKeyboardWillChangeFrameNotification object:nil]; [center addObserver:self @@ -199,11 +199,6 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse { name:UIKeyboardWillHideNotification object:nil]; - [center addObserver:self - selector:@selector(keyboardFrameDidChange:) - name:UIKeyboardDidChangeFrameNotification - object:nil]; - [center addObserver:self selector:@selector(onLocaleUpdated:) name:NSCurrentLocaleDidChangeNotification @@ -399,7 +394,7 @@ static inline PointerChangeMapperPhase PointerChangePhaseFromUITouchPhase(UITouc #pragma mark - Keyboard events -- (void)keyboardFrameDidChange:(NSNotification*)notification { +- (void)keyboardWillChangeFrame:(NSNotification*)notification { NSDictionary* info = [notification userInfo]; CGFloat bottom = CGRectGetHeight([[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]);