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 9503bff6f1fecc5d
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
     1.1 --- a/src/video/uikit/SDL_uikitview.h	Wed Jul 23 21:55:42 2014 -0300
     1.2 +++ b/src/video/uikit/SDL_uikitview.h	Wed Jul 23 22:35:14 2014 -0300
     1.3 @@ -49,7 +49,7 @@
     1.4  - (void)hideKeyboard;
     1.5  - (void)initializeKeyboard;
     1.6  
     1.7 -@property (nonatomic, readonly, assign, getter=isKeyboardVisible) BOOL keyboardVisible;
     1.8 +@property (nonatomic, assign, getter=isKeyboardVisible) BOOL keyboardVisible;
     1.9  @property (nonatomic, assign) SDL_Rect textInputRect;
    1.10  @property (nonatomic, assign) int keyboardHeight;
    1.11  
     2.1 --- a/src/video/uikit/SDL_uikitview.m	Wed Jul 23 21:55:42 2014 -0300
     2.2 +++ b/src/video/uikit/SDL_uikitview.m	Wed Jul 23 22:35:14 2014 -0300
     2.3 @@ -387,9 +387,10 @@
     2.4  void _uikit_keyboard_set_height(int height) {
     2.5      SDL_uikitview *view = getWindowView(SDL_GetFocusWindow());
     2.6      if (view == nil) {
     2.7 -        return ;
     2.8 +        return;
     2.9      }
    2.10 -    
    2.11 +
    2.12 +    view.keyboardVisible = height > 0;
    2.13      view.keyboardHeight = height;
    2.14      _uikit_keyboard_update();
    2.15  }