Commit cfe72c76e272173ea33187443e0c14bdb753deca

Sam Lantinga 2017-09-14T09:55:27

Fixed iOS keyboard positioning, based on the final position rather than the initial one

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/uikit/SDL_uikitviewcontroller.m b/src/video/uikit/SDL_uikitviewcontroller.m
index 6c3c23b..745e223 100644
--- a/src/video/uikit/SDL_uikitviewcontroller.m
+++ b/src/video/uikit/SDL_uikitviewcontroller.m
@@ -281,7 +281,7 @@ SDL_AppleTVControllerUIHintChanged(void *userdata, const char *name, const char 
 - (void)keyboardWillShow:(NSNotification *)notification
 {
 #if !TARGET_OS_TV
-    CGRect kbrect = [[notification userInfo][UIKeyboardFrameBeginUserInfoKey] CGRectValue];
+    CGRect kbrect = [[notification userInfo][UIKeyboardFrameEndUserInfoKey] CGRectValue];
 
     /* The keyboard rect is in the coordinate space of the screen/window, but we
      * want its height in the coordinate space of the view. */