From 05afbfdf2ca1b32911f694c432adc781a3211551 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 23 Jul 2014 22:35:14 -0300 Subject: [PATCH] Integrated Phil Hassey's patch to fix SDL_IsScreenKeyboardShown on iOS (https://bugzilla.libsdl.org/show_bug.cgi?id=2660) --- src/video/uikit/SDL_uikitview.h | 2 +- src/video/uikit/SDL_uikitview.m | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/video/uikit/SDL_uikitview.h b/src/video/uikit/SDL_uikitview.h index 417a68f41..0deafdbd7 100644 --- a/src/video/uikit/SDL_uikitview.h +++ b/src/video/uikit/SDL_uikitview.h @@ -49,7 +49,7 @@ - (void)hideKeyboard; - (void)initializeKeyboard; -@property (nonatomic, readonly, assign, getter=isKeyboardVisible) BOOL keyboardVisible; +@property (nonatomic, assign, getter=isKeyboardVisible) BOOL keyboardVisible; @property (nonatomic, assign) SDL_Rect textInputRect; @property (nonatomic, assign) int keyboardHeight; diff --git a/src/video/uikit/SDL_uikitview.m b/src/video/uikit/SDL_uikitview.m index 18a0538d6..3a2676e17 100644 --- a/src/video/uikit/SDL_uikitview.m +++ b/src/video/uikit/SDL_uikitview.m @@ -387,9 +387,10 @@ void _uikit_keyboard_update() { void _uikit_keyboard_set_height(int height) { SDL_uikitview *view = getWindowView(SDL_GetFocusWindow()); if (view == nil) { - return ; + return; } - + + view.keyboardVisible = height > 0; view.keyboardHeight = height; _uikit_keyboard_update(); }