Integrated Phil Hassey's patch to fix SDL_IsScreenKeyboardShown on iOS (https://bugzilla.libsdl.org/show_bug.cgi?id=2660) iOS-improvements
authorAlex Szpakowski <slime73@gmail.com>
Wed, 23 Jul 2014 22:35:14 -0300
branchiOS-improvements
changeset 9503 bff6f1fecc5d
parent 9502 933ed557b7c1
child 9504 1f3b6fc94fae
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
src/video/uikit/SDL_uikitview.m
--- a/src/video/uikit/SDL_uikitview.h	Wed Jul 23 21:55:42 2014 -0300
+++ b/src/video/uikit/SDL_uikitview.h	Wed Jul 23 22:35:14 2014 -0300
@@ -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;
 
--- a/src/video/uikit/SDL_uikitview.m	Wed Jul 23 21:55:42 2014 -0300
+++ b/src/video/uikit/SDL_uikitview.m	Wed Jul 23 22:35:14 2014 -0300
@@ -387,9 +387,10 @@
 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();
 }