Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[iOS] Hide the keyboard when scrolling on the iPhone

  • Loading branch information...
commit 3968a2b85d660c21faf58305634151e2cd9a2c74 1 parent 299578a
Romain Goyet authored
Showing with 5 additions and 1 deletion.
  1. +2 −1  runtime/doc/os_ios.txt
  2. +3 −0  src/gui_ios.m
View
3  runtime/doc/os_ios.txt
@@ -38,7 +38,8 @@ You're free to overwrite this setting by unmapping the backslash key.
Mouse events are also fully supported. Clicking and panning with a single
finger will generate click and drag events. Panning with two fingers will
-generate scrollwheel events (horizontal and vertical).
+generate scrollwheel events (horizontal and vertical). When scrolling on the
+iPhone, the keyboard will be hidden to make more room for the text.
==============================================================================
3. iTunes file sharing *ios-itunes*
View
3  src/gui_ios.m
@@ -218,6 +218,9 @@ - (void)pan:(UIPanGestureRecognizer *)sender {
}
- (void)scroll:(UIPanGestureRecognizer *)sender {
+ if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
+ [self resignFirstResponder];
+ }
CGPoint clickLocation = [sender locationInView:sender.view];
CGPoint translation = [sender translationInView:sender.view];
static int totalScrollX = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.