You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 2.0.1 Reported for operating system, platform: iOS 6, ARM
Comments on the original bug report:
On 2013-11-06 15:50:50 +0000, philhassey wrote:
Overview: While SDL_SetTextInputRect works perfectly to move my window out of the way of the virtual keyboard using SDL2/Android, on iOS this function has no effect.
Steps to Reproduce: Call SDL_SetTextInputRect with a rect near the bottom of the screen before calling SDL_StartTextInput.
Actual Results: The iOS virtual keyboard is displayed after calling SDL_StartTextInput, but the screen is not shifted to reveal the TextInputRect region.
Expected Results: The screen should be shifted to reveal the TextInputRect region (like with SDL2/Android.)
Build Date & Hardware: SDL 2.0.1, iOS 6.1.3, iPad 3rd Gen.
Additional Builds and Platforms: Don't know.
Additional Information: I was able to workaround this bug in my own code by using iOS calls to get the height of the virtual keyboard when it was displayed and shifting my own screen. I would prefer if this was part of SDL2 though.
To find the height of the screen you must addObservers for UIKeyboardWillShowNotification and UIKeyboardDidHideNotification. From the former, you can get the height/width of the keyboard using UIKeyboardFrameBeginUserInfoKey. Then pick height or width based on statusBarOrientation. Finally you must multiply by the mainScreen scale.
On 2013-11-11 01:22:29 +0000, Sam Lantinga wrote:
I'm not sure how we'd do this on iOS. Any ideas?
On 2013-11-11 17:43:01 +0000, philhassey wrote:
Created attachment 1417
Patch to implement SDL_SteTextInputRect for uikit/iOS.
This patch implements SDL_SetTextInputRect for uikit/iOS.
It sets up notification handlers to respond to changes in the display of the keyboard. These handlers then change the frame of the view so it is moved out of the way of the keyboard as per SetTextInputRect.
Created attachment 2050
Patch to add iOS 8 support for SDL_SetTextInputRect
I've updated this patch to add support for iOS 8. iOS 8 changed how coordinate systems worked, so the keyboard was opening improperly on all iOS 8 devices.
-Phil
On 2015-02-24 17:09:57 +0000, philhassey wrote:
I've re-opened this issue because my original patch only worked for iOS <= 7. This patch now supports 7 and 8.
On 2015-02-24 19:44:08 +0000, Alex Szpakowski wrote:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Patch to implement SDL_SteTextInputRect for uikit/iOS. (uikit.patch, text/plain, 2013-11-11 17:43:01 +0000, 6017 bytes)Reported in version: 2.0.1
Reported for operating system, platform: iOS 6, ARM
Comments on the original bug report:
On 2013-11-06 15:50:50 +0000, philhassey wrote:
On 2013-11-11 01:22:29 +0000, Sam Lantinga wrote:
On 2013-11-11 17:43:01 +0000, philhassey wrote:
On 2013-11-12 04:51:45 +0000, Sam Lantinga wrote:
On 2015-02-24 17:07:20 +0000, philhassey wrote:
On 2015-02-24 17:09:57 +0000, philhassey wrote:
On 2015-02-24 19:44:08 +0000, Alex Szpakowski wrote:
On 2015-04-10 02:44:59 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: