瀏覽代碼

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

Sam Lantinga 8 年之前
父節點
當前提交
cfe72c76e2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/uikit/SDL_uikitviewcontroller.m

+ 1 - 1
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. */